[Scummvm-git-logs] scummvm master -> b8afe5b663f17928f009616e11adf2d58d2879b3

phcoder noreply at scummvm.org
Tue Jan 17 21:51:45 UTC 2023


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a0cb2fb05e SURFACESDL: Don't pass private flags to SDL_CreateRGBSurface
66202f3a32 MIYOO: Configure and makefile support for Miyoo mini
576b2be0cb SDL: Workaround for broken SDL on Miyoo Mini
4eb090775e MIYOO: Set right paths for Miyoo Mini
378d1721ed MIYOO: Adjust button bindings for miyoo mini
b8afe5b663 NEWS: Add entry for miyoo mini


Commit: a0cb2fb05e536fb2e11624e4f4f8eefb1fe9ba15
    https://github.com/scummvm/scummvm/commit/a0cb2fb05e536fb2e11624e4f4f8eefb1fe9ba15
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
SURFACESDL: Don't pass private flags to SDL_CreateRGBSurface

sdl_video.h names all of SDL_RLEACCEL, SDL_SRCCOLORKEY and SDL_SRCALPHA
as private and read-only. Documentation mentions them in
SDL_CreateRGBSurface but also says they are automatically set on
either SDL_SetColorKey or on non-zero Amask.

Previously passing them created no problem but miyoo mini SDL gets confused,
so let's never pass the private flags.

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 121ec16c477..7d8c4229152 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1980,7 +1980,7 @@ void SurfaceSdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h,
 		assert(!_mouseOrigSurface);
 
 		// Allocate bigger surface because scalers will read past the boudaries.
-		_mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
+		_mouseOrigSurface = SDL_CreateRGBSurface(SDL_SWSURFACE,
 						_mouseCurState.w + _maxExtraPixels * 2,
 						_mouseCurState.h + _maxExtraPixels * 2,
 						_cursorFormat.bytesPerPixel * 8,
@@ -2074,7 +2074,7 @@ void SurfaceSdlGraphicsManager::blitCursor() {
 		if (_mouseSurface)
 			SDL_FreeSurface(_mouseSurface);
 
-		_mouseSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA,
+		_mouseSurface = SDL_CreateRGBSurface(SDL_SWSURFACE,
 						_mouseCurState.rW,
 						_mouseCurState.rH,
 						_mouseOrigSurface->format->BitsPerPixel,
@@ -2260,7 +2260,7 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 		height = _hwScreen->h;
 
 	_osdMessageSurface = SDL_CreateRGBSurface(
-		SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCALPHA,
+		SDL_SWSURFACE,
 		width, height, _hwScreen->format->BitsPerPixel, _hwScreen->format->Rmask, _hwScreen->format->Gmask, _hwScreen->format->Bmask, _hwScreen->format->Amask
 	);
 
@@ -2334,7 +2334,7 @@ void SurfaceSdlGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface
 		const Graphics::PixelFormat &iconFormat = icon->format;
 
 		_osdIconSurface = SDL_CreateRGBSurface(
-				SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCALPHA,
+				SDL_SWSURFACE,
 				icon->w, icon->h, iconFormat.bytesPerPixel * 8,
 				((0xFF >> iconFormat.rLoss) << iconFormat.rShift),
 				((0xFF >> iconFormat.gLoss) << iconFormat.gShift),


Commit: 66202f3a328b3f978ec0a54f8079e55244882ffb
    https://github.com/scummvm/scummvm/commit/66202f3a328b3f978ec0a54f8079e55244882ffb
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
MIYOO: Configure and makefile support for Miyoo mini

Changed paths:
  A backends/platform/sdl/miyoo/build_miyoomini.sh
  A dists/miyoo/config.miyoomini.json
  A dists/miyoo/launch.miyoomini.sh
  A dists/miyoo/scummvm-miyoomini.png
    backends/platform/sdl/miyoo/miyoo.mk
    backends/platform/sdl/posix/posix-main.cpp
    configure


diff --git a/backends/platform/sdl/miyoo/build_miyoomini.sh b/backends/platform/sdl/miyoo/build_miyoomini.sh
new file mode 100755
index 00000000000..75f7dad7551
--- /dev/null
+++ b/backends/platform/sdl/miyoo/build_miyoomini.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+TOOLCHAIN=/opt/miyoomini-toolchain
+SYSROOT=$TOOLCHAIN/arm-linux-gnueabihf
+
+export PATH=$TOOLCHAIN/usr/bin:$SYSROOT/usr/include:$TOOLCHAIN/bin:$PATH
+export CXX=arm-linux-gnueabihf-g++
+
+./configure --host=miyoomini --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/miyoo/miyoo.mk b/backends/platform/sdl/miyoo/miyoo.mk
index 3007c51242a..2d138f5e8d8 100644
--- a/backends/platform/sdl/miyoo/miyoo.mk
+++ b/backends/platform/sdl/miyoo/miyoo.mk
@@ -1,7 +1,11 @@
 OD_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
 bundle = sd-root
 
+ifeq ($(MIYOO_TARGET), miyoomini)
+G2X_CATEGORY = App
+else
 G2X_CATEGORY = games
+endif
 
 all: $(OD_EXE_STRIPPED)
 
@@ -30,16 +34,31 @@ ifdef DYNAMIC_MODULES
 	$(CP) $(PLUGINS) $(bundle)/$(G2X_CATEGORY)/scummvm/plugins/
 endif
 	$(CP) $(EXECUTABLE) $(bundle)/$(G2X_CATEGORY)/scummvm/scummvm
+ifeq ($(MIYOO_TARGET), miyoomini)
+	$(CP) $(srcdir)/dists/miyoo/scummvm-miyoomini.png $(bundle)/$(G2X_CATEGORY)/scummvm/scummvm.png
+endif
 	$(CP) $(srcdir)/backends/platform/sdl/miyoo/README.MIYOO $(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
+ifeq ($(MIYOO_TARGET), miyoomini)
+	$(CP) $(srcdir)/dists/miyoo/launch.miyoomini.sh $(bundle)/$(G2X_CATEGORY)/scummvm/launch.sh
+	$(CP) $(srcdir)/dists/miyoo/config.miyoomini.json $(bundle)/$(G2X_CATEGORY)/scummvm/config.json
+# Workaround for mismatch between SDK and actual device
+	$(CP) /opt/miyoomini-toolchain/arm-linux-gnueabihf/libc/usr/lib/libpng16.so.16.* $(bundle)/$(G2X_CATEGORY)/scummvm/libpng16.so.16
+	$(CP) /opt/miyoomini-toolchain/arm-linux-gnueabihf/libc/usr/lib/libz.so.1.2.11 $(bundle)/$(G2X_CATEGORY)/scummvm/libz.so.1
+else
 	$(MKDIR) -p $(bundle)/gmenu2x/sections/$(G2X_CATEGORY)
 	$(CP) $(srcdir)/dists/miyoo/scummvm.miyoo $(bundle)/gmenu2x/sections/$(G2X_CATEGORY)/scummvm
+endif
 	$(STRIP) $(bundle)/$(G2X_CATEGORY)/scummvm/scummvm
 
 sd-zip: $(bundle)
 	$(RM) scummvm_$(MIYOO_TARGET).zip
+ifeq ($(MIYOO_TARGET), miyoomini)
+	cd $(bundle) && zip -r ../scummvm_$(MIYOO_TARGET).zip $(G2X_CATEGORY)
+else
 	cd $(bundle) && zip -r ../scummvm_$(MIYOO_TARGET).zip $(G2X_CATEGORY) gmenu2x
+endif
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp
index b3f6d7f5f19..b488025278a 100644
--- a/backends/platform/sdl/posix/posix-main.cpp
+++ b/backends/platform/sdl/posix/posix-main.cpp
@@ -21,7 +21,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3) && !defined(PSP2) && !defined(NINTENDO_SWITCH)  && !defined(__EMSCRIPTEN__) && !defined(MIYOO)
+#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3) && !defined(PSP2) && !defined(NINTENDO_SWITCH)  && !defined(__EMSCRIPTEN__) && !defined(MIYOO) && !defined(MIYOOMINI)
 
 #include "backends/platform/sdl/posix/posix.h"
 #include "backends/plugins/sdl/sdl-provider.h"
diff --git a/configure b/configure
index 6bd74eedd53..ac9dd12382b 100755
--- a/configure
+++ b/configure
@@ -837,6 +837,7 @@ Special configuration feature:
                                            ios7-arm64 for Apple iPhone / iPad (iOS >= 7, 64-bit)
                                            maemo for Nokia Maemo
                                            miyoo for 1st generation Miyoo
+                                           miyoomini for Miyoo Mini
                                            n64 for Nintendo 64
                                            opendingux-gcw0 for GCW0 with Opendingux Beta
                                            opendingux-lepus for Lepus with Opendingux Beta
@@ -1647,6 +1648,11 @@ miyoo)
 	_host_cpu=arm
 	_host_alias=arm-linux
 	;;
+miyoomini)
+	_host_os=linux
+	_host_cpu=arm
+	_host_alias=arm-linux-gnueabihf
+	;;
 n64)
 	_host_os=n64
 	_host_cpu=mips
@@ -3543,6 +3549,28 @@ if test -n "$_host"; then
 			add_line_to_config_mk 'MIYOO = 1'
 			add_line_to_config_mk "MIYOO_TARGET = miyoo"
 			;;
+		miyoomini)
+			_sysroot=`$CXX --print-sysroot`
+			_sdlpath=$_sysroot/usr/bin
+			append_var DEFINES  "-DMIYOOMINI -DREDUCE_MEMORY_USAGE -DUNCACHED_PLUGINS"
+			append_var CXXFLAGS "-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -O3 -march=armv7ve -ffast-math -fomit-frame-pointer -fno-strength-reduce"
+			append_var LDFLAGS  "-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -O3 -march=armv7ve -ffast-math -fomit-frame-pointer -fno-strength-reduce"
+			append_var LDFLAGS  "-O3 -Wl,--as-needed,--gc-sections"
+			_vkeybd=yes
+			_alsa=no
+			_mt32emu=no
+			_timidity=no
+			_fluidsynth=no
+			_highres=yes
+			_seq_midi=no
+			_nuked_opl=no
+			_curl=no
+			_optimization_level=-O3
+			_backend="miyoo"
+			_port_mk="backends/platform/sdl/miyoo/miyoo.mk"
+			add_line_to_config_mk 'MIYOO = 1'
+			add_line_to_config_mk "MIYOO_TARGET = miyoomini"
+			;;
 		n64)
 			append_var CXXFLAGS "-mno-extern-sdata"
 			append_var CXXFLAGS "--param max-inline-insns-auto=20"
@@ -3820,7 +3848,7 @@ case $_backend in
 		append_var DEFINES "-DUSE_NULL_DRIVER"
 		_text_console=yes
 		;;
-	opendingux | miyoo)
+	opendingux | miyoo | miyoomini)
 		_sdlconfig=sdl-config
 		_sdl=auto
 		append_var MODULES "backends/platform/sdl"
@@ -4018,7 +4046,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 | miyoo | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
+	3ds | android | dingux | dc | ds | gph | iphone | ios7 | maemo | null | opendingux | miyoomini | miyoo | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
 		if test "$_16bit" = auto ; then
 			_16bit=yes
 		else
diff --git a/dists/miyoo/config.miyoomini.json b/dists/miyoo/config.miyoomini.json
new file mode 100755
index 00000000000..a9e66ff3c06
--- /dev/null
+++ b/dists/miyoo/config.miyoomini.json
@@ -0,0 +1,7 @@
+{
+"label":"ScummVM",
+"icon":"scummvm.png",
+"iconsel":"scummvm.png",
+"launch":"launch.sh",
+"description":"Interpreter for several adventure games"
+}
diff --git a/dists/miyoo/launch.miyoomini.sh b/dists/miyoo/launch.miyoomini.sh
new file mode 100755
index 00000000000..74f46df9927
--- /dev/null
+++ b/dists/miyoo/launch.miyoomini.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo $0 $* > scummvm.log
+progdir=`dirname "$0"`
+HOME=$progdir LD_LIBRARY_PATH=$progdir:$LD_LIBRARY_PATH $progdir/scummvm >> scummvm.log 2>&1
diff --git a/dists/miyoo/scummvm-miyoomini.png b/dists/miyoo/scummvm-miyoomini.png
new file mode 100755
index 00000000000..baac9c733fa
Binary files /dev/null and b/dists/miyoo/scummvm-miyoomini.png differ


Commit: 576b2be0cb8ba290e5c9a57d9716e473f96316c4
    https://github.com/scummvm/scummvm/commit/576b2be0cb8ba290e5c9a57d9716e473f96316c4
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
SDL: Workaround for broken SDL on Miyoo Mini

Changed paths:
  A backends/graphics/miyoo/miyoomini-graphics.cpp
  A backends/graphics/miyoo/miyoomini-graphics.h
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.h
    backends/module.mk
    backends/platform/sdl/miyoo/miyoo.cpp


diff --git a/backends/graphics/miyoo/miyoomini-graphics.cpp b/backends/graphics/miyoo/miyoomini-graphics.cpp
new file mode 100644
index 00000000000..b731a517553
--- /dev/null
+++ b/backends/graphics/miyoo/miyoomini-graphics.cpp
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "backends/graphics/miyoo/miyoomini-graphics.h"
+
+void MiyooMiniGraphicsManager::initGraphicsSurface() {
+	_hwScreen = nullptr;
+	_realHwScreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32,
+					 SDL_HWSURFACE);
+	if (!_realHwScreen)
+		return;
+	_hwScreen = SDL_CreateRGBSurface(SDL_HWSURFACE, _videoMode.hardwareWidth, _videoMode.hardwareHeight,
+					 _realHwScreen->format->BitsPerPixel,
+					 _realHwScreen->format->Rmask,
+					 _realHwScreen->format->Gmask,
+					 _realHwScreen->format->Bmask,
+					 _realHwScreen->format->Amask);
+	_isDoubleBuf = false;
+}
+
+void MiyooMiniGraphicsManager::unloadGFXMode() {
+	if (_realHwScreen) {
+		SDL_FreeSurface(_realHwScreen);
+		_realHwScreen = nullptr;
+	}
+	SurfaceSdlGraphicsManager::unloadGFXMode();
+}
+
+void MiyooMiniGraphicsManager::updateScreen(SDL_Rect *dirtyRectList, int actualDirtyRects) {
+	SDL_BlitSurface(_hwScreen, nullptr, _realHwScreen, nullptr);
+	SDL_UpdateRects(_realHwScreen, actualDirtyRects, _dirtyRectList);
+}
+
diff --git a/backends/graphics/miyoo/miyoomini-graphics.h b/backends/graphics/miyoo/miyoomini-graphics.h
new file mode 100644
index 00000000000..cbee45c896f
--- /dev/null
+++ b/backends/graphics/miyoo/miyoomini-graphics.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef BACKENDS_GRAPHICS_MIYOOMINI_H
+#define BACKENDS_GRAPHICS_MIYOOMINI_H
+
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
+
+class MiyooMiniGraphicsManager : public SurfaceSdlGraphicsManager {
+public:
+	MiyooMiniGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window) : SurfaceSdlGraphicsManager(sdlEventSource, window), _realHwScreen(nullptr) {}
+
+	void initGraphicsSurface() override;
+	void unloadGFXMode() override;
+	void updateScreen(SDL_Rect *dirtyRectList, int actualDirtyRects) override;
+
+private:
+	SDL_Surface *_realHwScreen;
+};
+
+#endif /* BACKENDS_GRAPHICS_MIYOOMINI_H */
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 7d8c4229152..e3cb5eab1c9 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1144,6 +1144,10 @@ void SurfaceSdlGraphicsManager::updateScreen() {
 	internUpdateScreen();
 }
 
+void SurfaceSdlGraphicsManager::updateScreen(SDL_Rect *dirtyRectList, int actualDirtyRects) {
+	SDL_UpdateRects(_hwScreen, actualDirtyRects, dirtyRectList);
+}
+
 void SurfaceSdlGraphicsManager::internUpdateScreen() {
 	SDL_Surface *srcSurf, *origSurf;
 	int height, width;
@@ -1447,7 +1451,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {
 
 		// Finally, blit all our changes to the screen
 		if (!_displayDisabled) {
-			SDL_UpdateRects(_hwScreen, actualDirtyRects, _dirtyRectList);
+			updateScreen(_dirtyRectList, actualDirtyRects);
 		}
 	}
 
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 280a12b0611..cf8b44ff2ae 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -420,6 +420,7 @@ protected:
 	virtual void blitCursor();
 
 	virtual void internUpdateScreen();
+	virtual void updateScreen(SDL_Rect *dirtyRectList, int actualDirtyRects);
 
 	virtual bool loadGFXMode();
 	virtual void unloadGFXMode();
diff --git a/backends/module.mk b/backends/module.mk
index a0b326fb001..3b27cb913fa 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -350,6 +350,13 @@ MODULE_OBJS += \
 	mixer/null/null-mixer.o
 endif
 
+ifdef MIYOO
+ifeq ($(MIYOO_TARGET), miyoomini)
+MODULE_OBJS += \
+	graphics/miyoo/miyoomini-graphics.o
+endif
+endif
+
 ifdef OPENDINGUX
 MODULE_OBJS += \
 	graphics/opendingux/opendingux-graphics.o
diff --git a/backends/platform/sdl/miyoo/miyoo.cpp b/backends/platform/sdl/miyoo/miyoo.cpp
index 7357b5653f4..a590771dd52 100644
--- a/backends/platform/sdl/miyoo/miyoo.cpp
+++ b/backends/platform/sdl/miyoo/miyoo.cpp
@@ -25,6 +25,9 @@
 #include "common/config-manager.h"
 #include "common/translation.h"
 
+#ifdef MIYOOMINI
+#include "backends/graphics/miyoo/miyoomini-graphics.h"
+#endif
 #include "backends/platform/sdl/miyoo/miyoo.h"
 
 #include "backends/fs/posix/posix-fs-factory.h"
@@ -147,6 +150,13 @@ void OSystem_SDL_Miyoo::initBackend() {
 		_savefileManager = new DefaultSaveFileManager(SAVE_PATH);
 	}
 
+#ifdef MIYOOMINI
+	if (!_eventSource)
+		_eventSource = new SdlEventSource();
+	if (!_graphicsManager)
+		_graphicsManager = new MiyooMiniGraphicsManager(_eventSource, _window);
+#endif
+
 	OSystem_SDL::initBackend();
 }
 


Commit: 4eb090775ef532612f80eaed092f78c329200d03
    https://github.com/scummvm/scummvm/commit/4eb090775ef532612f80eaed092f78c329200d03
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
MIYOO: Set right paths for Miyoo Mini

Changed paths:
    backends/platform/sdl/miyoo/miyoo.cpp


diff --git a/backends/platform/sdl/miyoo/miyoo.cpp b/backends/platform/sdl/miyoo/miyoo.cpp
index a590771dd52..f378546b010 100644
--- a/backends/platform/sdl/miyoo/miyoo.cpp
+++ b/backends/platform/sdl/miyoo/miyoo.cpp
@@ -40,10 +40,17 @@
 #include "backends/keymapper/keymap.h"
 #include "backends/keymapper/keymapper.h"
 
+#ifdef MIYOOMINI
+#define SCUMM_DIR	"/mnt/SDCARD/.scummvm"
+#define CONFIG_FILE	"/mnt/SDCARD/.scummvmrc"
+#define SAVE_PATH	"/mnt/SDCARD/.scummvm/saves"
+#define LOG_FILE	"/mnt/SDCARD/.scummvm/scummvm.log"
+#else
 #define SCUMM_DIR	"/mnt/.scummvm"
 #define CONFIG_FILE	"/mnt/.scummvmrc"
 #define SAVE_PATH	"/mnt/.scummvm/saves"
 #define LOG_FILE	"/mnt/.scummvm/scummvm.log"
+#endif
 #define JOYSTICK_DIR	"/sys/devices/platform/joystick"
 
 static const Common::KeyTableEntry odKeyboardButtons[] = {


Commit: 378d1721ed4931b52964e613d8d617236f4205b0
    https://github.com/scummvm/scummvm/commit/378d1721ed4931b52964e613d8d617236f4205b0
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
MIYOO: Adjust button bindings for miyoo mini

Changed paths:
    backends/platform/sdl/miyoo/miyoo.cpp


diff --git a/backends/platform/sdl/miyoo/miyoo.cpp b/backends/platform/sdl/miyoo/miyoo.cpp
index f378546b010..b6ef849ccd0 100644
--- a/backends/platform/sdl/miyoo/miyoo.cpp
+++ b/backends/platform/sdl/miyoo/miyoo.cpp
@@ -54,10 +54,17 @@
 #define JOYSTICK_DIR	"/sys/devices/platform/joystick"
 
 static const Common::KeyTableEntry odKeyboardButtons[] = {
+#ifdef MIYOOMINI
+	{ "JOY_A",		Common::KEYCODE_SPACE,		_s("A")			},
+	{ "JOY_B",		Common::KEYCODE_LCTRL,		_s("B")			},
+	{ "JOY_X",		Common::KEYCODE_LSHIFT,		_s("X")			},
+	{ "JOY_Y",		Common::KEYCODE_LALT,		_s("Y")			},
+#else
 	{ "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")			},
+#endif
 	{ "JOY_BACK",		Common::KEYCODE_ESCAPE,		_s("Select")		},
 	{ "JOY_START",		Common::KEYCODE_RETURN,		_s("Start")		},
 	{ "JOY_LEFT_SHOULDER",	Common::KEYCODE_TAB,		_s("L")			},


Commit: b8afe5b663f17928f009616e11adf2d58d2879b3
    https://github.com/scummvm/scummvm/commit/b8afe5b663f17928f009616e11adf2d58d2879b3
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-18T00:51:38+03:00

Commit Message:
NEWS: Add entry for miyoo mini

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 9ab0629d58f..f036e79f328 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -18,6 +18,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - RetroMini RS90 under OpenDingux beta.
    - 1st generation Miyoo (New BittBoy, Pocket Go and PowKiddy Q90-V90-Q20)
      under TriForceX MiyooCFW.
+   - Miyoo mini
 
  General:
    - Reduced amount of false positives in Mass Add.




More information about the Scummvm-git-logs mailing list