[Scummvm-git-logs] scummvm master -> d924671cec38a01e93c095119b07a3758d6d3432
phcoder
noreply at scummvm.org
Thu Jan 12 13:39:44 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4e4c652433 SDL: Properly restore gfx mode if several parameters have changed
d924671cec OPENDINGUX: Miyoo (1st gen) support
Commit: 4e4c65243388a617f5909afac211db7f526bd2af
https://github.com/scummvm/scummvm/commit/4e4c65243388a617f5909afac211db7f526bd2af
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-12T16:39:38+03:00
Commit Message:
SDL: Properly restore gfx mode if several parameters have changed
Currently we have bunch of else-if and only one of them triggered. When
e.g. aspect ratio correction and resolution changes only aspect ratio is
covered by restoration. If this fails the code retries the same mode endlessly
Changed paths:
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 4ea7bb5f02a..c8d87e61ead 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -322,33 +322,43 @@ OSystem::TransactionError SurfaceSdlGraphicsManager::endGFXTransaction() {
errors |= OSystem::kTransactionFullscreenFailed;
_videoMode.fullscreen = _oldVideoMode.fullscreen;
- } else if (_videoMode.aspectRatioCorrection != _oldVideoMode.aspectRatioCorrection) {
+ }
+
+ if (_videoMode.aspectRatioCorrection != _oldVideoMode.aspectRatioCorrection) {
errors |= OSystem::kTransactionAspectRatioFailed;
_videoMode.aspectRatioCorrection = _oldVideoMode.aspectRatioCorrection;
- } else if (_videoMode.scalerIndex != _oldVideoMode.scalerIndex) {
+ }
+
+ if (_videoMode.scalerIndex != _oldVideoMode.scalerIndex) {
errors |= OSystem::kTransactionModeSwitchFailed;
_videoMode.scalerIndex = _oldVideoMode.scalerIndex;
_videoMode.scaleFactor = _oldVideoMode.scaleFactor;
+ }
+
#if SDL_VERSION_ATLEAST(2, 0, 0)
- } else if (_videoMode.stretchMode != _oldVideoMode.stretchMode) {
+ if (_videoMode.stretchMode != _oldVideoMode.stretchMode) {
errors |= OSystem::kTransactionStretchModeSwitchFailed;
_videoMode.stretchMode = _oldVideoMode.stretchMode;
+ }
#endif
- } else if (_videoMode.filtering != _oldVideoMode.filtering) {
+ if (_videoMode.filtering != _oldVideoMode.filtering) {
errors |= OSystem::kTransactionFilteringFailed;
_videoMode.filtering = _oldVideoMode.filtering;
+ }
#ifdef USE_RGB_COLOR
- } else if (_videoMode.format != _oldVideoMode.format) {
+ if (_videoMode.format != _oldVideoMode.format) {
errors |= OSystem::kTransactionFormatNotSupported;
_videoMode.format = _oldVideoMode.format;
_screenFormat = _videoMode.format;
+ }
#endif
- } else if (_videoMode.screenWidth != _oldVideoMode.screenWidth || _videoMode.screenHeight != _oldVideoMode.screenHeight) {
+
+ if (_videoMode.screenWidth != _oldVideoMode.screenWidth || _videoMode.screenHeight != _oldVideoMode.screenHeight) {
errors |= OSystem::kTransactionSizeChangeFailed;
_videoMode.screenWidth = _oldVideoMode.screenWidth;
@@ -357,20 +367,11 @@ OSystem::TransactionError SurfaceSdlGraphicsManager::endGFXTransaction() {
_videoMode.overlayHeight = _oldVideoMode.overlayHeight;
}
- if (_videoMode.fullscreen == _oldVideoMode.fullscreen &&
- _videoMode.aspectRatioCorrection == _oldVideoMode.aspectRatioCorrection &&
- _videoMode.scalerIndex == _oldVideoMode.scalerIndex &&
- _videoMode.scaleFactor == _oldVideoMode.scaleFactor &&
- _videoMode.filtering == _oldVideoMode.filtering &&
- _videoMode.screenWidth == _oldVideoMode.screenWidth &&
- _videoMode.screenHeight == _oldVideoMode.screenHeight) {
-
- // Our new video mode would now be exactly the same as the
- // old one. Since we still can not assume SDL_SetVideoMode
- // to be working fine, we need to invalidate the old video
- // mode, so loadGFXMode would error out properly.
- _oldVideoMode.setup = false;
- }
+ // Our new video mode would now be exactly the same as the
+ // old one. Since we still can not assume SDL_SetVideoMode
+ // to be working fine, we need to invalidate the old video
+ // mode, so loadGFXMode would error out properly.
+ _oldVideoMode.setup = false;
}
#ifdef USE_RGB_COLOR
Commit: d924671cec38a01e93c095119b07a3758d6d3432
https://github.com/scummvm/scummvm/commit/d924671cec38a01e93c095119b07a3758d6d3432
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-12T16:39:38+03:00
Commit Message:
OPENDINGUX: Miyoo (1st gen) support
Changed paths:
A backends/platform/sdl/opendingux/build_miyoo.sh
A backends/platform/sdl/opendingux/miyoo.mk
A dists/opendingux/scummvm.miyoo
backends/platform/sdl/opendingux/opendingux.cpp
configure
diff --git a/backends/platform/sdl/opendingux/build_miyoo.sh b/backends/platform/sdl/opendingux/build_miyoo.sh
new file mode 100755
index 00000000000..9772554a124
--- /dev/null
+++ b/backends/platform/sdl/opendingux/build_miyoo.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+TOOLCHAIN=/opt/miyoo
+SYSROOT=$TOOLCHAIN/arm-miyoo-linux-uclibcgnueabi
+
+export PATH=$TOOLCHAIN/usr/bin:$SYSROOT/usr/include:$TOOLCHAIN/bin:$PATH
+export CXX=arm-linux-g++
+
+./configure --host=miyoo --enable-release --disable-detection-full --enable-plugins --default-dynamic --enable-engine=testbed
+
+make -j5 all sd-root sd-zip
diff --git a/backends/platform/sdl/opendingux/miyoo.mk b/backends/platform/sdl/opendingux/miyoo.mk
new file mode 100644
index 00000000000..4912ab02b4c
--- /dev/null
+++ b/backends/platform/sdl/opendingux/miyoo.mk
@@ -0,0 +1,46 @@
+OD_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
+bundle = sd-root
+
+G2X_CATEGORY = games
+
+all: $(OD_EXE_STRIPPED)
+
+$(OD_EXE_STRIPPED): $(EXECUTABLE)
+ $(STRIP) $< -o $@
+
+$(bundle): all
+ $(RM) -rf $(bundle)
+ $(MKDIR) -p $(bundle)/$(G2X_CATEGORY)/scummvm
+ $(CP) $(DIST_FILES_DOCS) $(bundle)/$(G2X_CATEGORY)/scummvm
+ $(MKDIR) $(bundle)/$(G2X_CATEGORY)/scummvm/themes
+ $(CP) $(DIST_FILES_THEMES) $(bundle)/$(G2X_CATEGORY)/scummvm/themes/
+
+ifdef DIST_FILES_ENGINEDATA
+ $(MKDIR) $(bundle)/$(G2X_CATEGORY)/scummvm/engine-data
+ $(CP) $(DIST_FILES_ENGINEDATA) $(bundle)/$(G2X_CATEGORY)/scummvm/engine-data/
+endif
+ifdef DIST_FILES_NETWORKING
+ $(CP) $(DIST_FILES_NETWORKING) $(bundle)/$(G2X_CATEGORY)/scummvm
+endif
+ifdef DIST_FILES_VKEYBD
+ $(CP) $(DIST_FILES_VKEYBD) $(bundle)/$(G2X_CATEGORY)/scummvm
+endif
+ifdef DYNAMIC_MODULES
+ $(MKDIR) $(bundle)/$(G2X_CATEGORY)/scummvm/plugins/
+ $(CP) $(PLUGINS) $(bundle)/$(G2X_CATEGORY)/scummvm/plugins/
+endif
+ $(CP) $(EXECUTABLE) $(bundle)/$(G2X_CATEGORY)/scummvm/scummvm
+ $(CP) $(srcdir)/dists/opendingux/scummvm.png $(bundle)/$(G2X_CATEGORY)/scummvm
+ $(CP) $(srcdir)/backends/platform/sdl/opendingux/README.OPENDINGUX $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ echo >> $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ echo '[General README]' >> $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ echo >> $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ cat $(srcdir)/README.md | sed -e 's/\[/â¦/g' -e 's/\]/â§/g' -e '/^1\.1)/,$$ s/^[0-9][0-9]*\.[0-9][0-9]*.*/\[&\]/' >> $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ echo '[General README]' >> $(bundle)/$(G2X_CATEGORY)/scummvm/README.man.txt
+ $(MKDIR) -p $(bundle)/gmenu2x/sections/$(G2X_CATEGORY)
+ $(CP) $(srcdir)/dists/opendingux/scummvm.miyoo $(bundle)/gmenu2x/sections/$(G2X_CATEGORY)/scummvm
+ $(STRIP) $(bundle)/$(G2X_CATEGORY)/scummvm/scummvm
+
+sd-zip: $(bundle)
+ $(RM) scummvm_$(OPENDINGUX_TARGET).zip
+ cd $(bundle) && zip -r ../scummvm_$(OPENDINGUX_TARGET).zip $(G2X_CATEGORY) gmenu2x
diff --git a/backends/platform/sdl/opendingux/opendingux.cpp b/backends/platform/sdl/opendingux/opendingux.cpp
index 459133c1fe0..ed6a53fb648 100644
--- a/backends/platform/sdl/opendingux/opendingux.cpp
+++ b/backends/platform/sdl/opendingux/opendingux.cpp
@@ -37,17 +37,31 @@
#include "backends/keymapper/keymap.h"
#include "backends/keymapper/keymapper.h"
+#ifdef MIYOO
+#define SCUMM_DIR "/mnt/.scummvm"
+#define CONFIG_FILE "/mnt/.scummvmrc"
+#define SAVE_PATH "/mnt/.scummvm/saves"
+#define LOG_FILE "/mnt/.scummvm/scummvm.log"
+#else
#define SCUMM_DIR "~/.scummvm"
#define CONFIG_FILE "~/.scummvmrc"
#define SAVE_PATH "~/.scummvm/saves"
#define LOG_FILE "~/.scummvm/scummvm.log"
+#endif
#define JOYSTICK_DIR "/sys/devices/platform/joystick"
static const Common::KeyTableEntry odKeyboardButtons[] = {
+#ifdef MIYOO
+ { "JOY_A", Common::KEYCODE_LALT, _s("A") },
+ { "JOY_B", Common::KEYCODE_LCTRL, _s("B") },
+ { "JOY_X", Common::KEYCODE_LSHIFT, _s("X") },
+ { "JOY_Y", Common::KEYCODE_SPACE, _s("Y") },
+#else
{ "JOY_A", Common::KEYCODE_LCTRL, _s("A") },
{ "JOY_B", Common::KEYCODE_LALT, _s("B") },
{ "JOY_X", Common::KEYCODE_SPACE, _s("X") },
{ "JOY_Y", Common::KEYCODE_LSHIFT, _s("Y") },
+#endif
{ "JOY_BACK", Common::KEYCODE_ESCAPE, _s("Select") },
{ "JOY_START", Common::KEYCODE_RETURN, _s("Start") },
{ "JOY_LEFT_SHOULDER", Common::KEYCODE_TAB, _s("L") },
@@ -56,6 +70,13 @@ static const Common::KeyTableEntry odKeyboardButtons[] = {
{ "JOY_DOWN", Common::KEYCODE_DOWN, _s("D-pad Down") },
{ "JOY_LEFT", Common::KEYCODE_LEFT, _s("D-pad Left") },
{ "JOY_RIGHT", Common::KEYCODE_RIGHT, _s("D-pad Right") },
+#ifdef MIYOO
+ { "JOY_LEFT_STICK", Common::KEYCODE_PAGEUP, _s("L2") },
+ { "JOY_RIGHT_STICK", Common::KEYCODE_PAGEDOWN, _s("R2") },
+ { "JOY_LEFT_TRIGGER", Common::KEYCODE_RALT, _s("L3") },
+ { "JOY_RIGHT_TRIGGER", Common::KEYCODE_RSHIFT, _s("R3") },
+ { "JOY_GUIDE", Common::KEYCODE_RCTRL, _s("Menu") },
+#endif
{nullptr, Common::KEYCODE_INVALID, nullptr }
};
diff --git a/configure b/configure
index 6e579548ca1..bdc8b98192c 100755
--- a/configure
+++ b/configure
@@ -836,6 +836,7 @@ Special configuration feature:
ios7 for Apple iPhone / iPad (iOS >= 7)
ios7-arm64 for Apple iPhone / iPad (iOS >= 7, 64-bit)
maemo for Nokia Maemo
+ miyoo for 1st generation Miyoo
n64 for Nintendo 64
opendingux-gcw0 for GCW0 with Opendingux Beta
opendingux-lepus for Lepus with Opendingux Beta
@@ -1642,6 +1643,11 @@ maemo)
datadir=/opt/scummvm/share
docdir='${datarootdir}/doc/scummvm'
;;
+miyoo)
+ _host_os=linux
+ _host_cpu=arm
+ _host_alias=arm-linux
+ ;;
n64)
_host_os=n64
_host_cpu=mips
@@ -3511,6 +3517,33 @@ if test -n "$_host"; then
append_var LDFLAGS "-static-libgcc"
append_var LIBS "-laudio"
;;
+ miyoo)
+ _sysroot=`$CXX --print-sysroot`
+ _sdlpath=$_sysroot/usr/bin
+ append_var DEFINES "-DMIYOO -DREDUCE_MEMORY_USAGE -DDINGUX -DOPENDINGUX -DUNCACHED_PLUGINS"
+ append_var CXXFLAGS "-march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer -ffunction-sections -fdata-sections"
+ append_var LDFLAGS "-march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer -ffunction-sections -fdata-sections"
+ append_var LDFLAGS "-O3 -Wl,--as-needed,--gc-sections"
+ _vkeybd=yes
+ _alsa=no
+ # Explicitly use tremor
+ _vorbis=no
+ _tremor=yes
+ _mt32emu=no
+ _timidity=no
+ _fluidsynth=no
+ _highres=no
+ # TODO: There's some problem with libFLAC availability. Fix and reenable
+ _flac=no
+ _seq_midi=no
+ _nuked_opl=no
+ _curl=no
+ _optimization_level=-O3
+ _backend="opendingux"
+ _port_mk="backends/platform/sdl/opendingux/miyoo.mk"
+ add_line_to_config_mk 'OPENDINGUX = 1'
+ add_line_to_config_mk "OPENDINGUX_TARGET = miyoo"
+ ;;
n64)
append_var CXXFLAGS "-mno-extern-sdata"
append_var CXXFLAGS "--param max-inline-insns-auto=20"
@@ -3788,7 +3821,7 @@ case $_backend in
append_var DEFINES "-DUSE_NULL_DRIVER"
_text_console=yes
;;
- opendingux)
+ opendingux | miyoo)
_sdlconfig=sdl-config
_sdl=auto
append_var MODULES "backends/platform/sdl"
@@ -3986,7 +4019,7 @@ fi
# Enable 16bit support only for backends which support it
#
case $_backend in
- 3ds | android | dingux | dc | ds | gph | iphone | ios7 | maemo | null | opendingux | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
+ 3ds | android | dingux | dc | ds | gph | iphone | ios7 | maemo | null | opendingux | miyoo | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
if test "$_16bit" = auto ; then
_16bit=yes
else
diff --git a/dists/opendingux/scummvm.miyoo b/dists/opendingux/scummvm.miyoo
new file mode 100644
index 00000000000..c975954fb52
--- /dev/null
+++ b/dists/opendingux/scummvm.miyoo
@@ -0,0 +1,4 @@
+title=ScummVM
+description=Interpreter for several adventure games
+exec=/mnt/games/scummvm/scummvm
+clock=702
More information about the Scummvm-git-logs
mailing list