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

phcoder noreply at scummvm.org
Thu Jan 19 00:07:26 UTC 2023


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

Summary:
d4675e7ddc MIYOO: Correct gamepad mapping and corresponding documentation


Commit: d4675e7ddc1e9e3368b01c2f9079974e6485b0f9
    https://github.com/scummvm/scummvm/commit/d4675e7ddc1e9e3368b01c2f9079974e6485b0f9
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-01-19T01:07:07+01:00

Commit Message:
MIYOO: Correct gamepad mapping and corresponding documentation

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


diff --git a/backends/platform/sdl/miyoo/README.MIYOO b/backends/platform/sdl/miyoo/README.MIYOO
index fc02d1b2b1d..2cbca1f7db5 100644
--- a/backends/platform/sdl/miyoo/README.MIYOO
+++ b/backends/platform/sdl/miyoo/README.MIYOO
@@ -6,17 +6,12 @@ Dpad - Mouse
 Dpad+R - Slow Mouse
 A - Left mouse click
 B - Right mouse click
-X - Escape
-X+R - Return
-Y - Period
-Y+R - Space
+Y - Escape
 L - Game Menu (F5)
-R - Shift
 Start - Global Menu
 Select - Virtual Keyboard
-Select+R - AGI predictive input dialog
-D-pad - Keypad cursor keys
-D-Pad+R - Diagonal cursor keys
+
+All buttons are available for (re)mapping in keymapper
 
 Troubleshooting
 ===============
diff --git a/backends/platform/sdl/miyoo/miyoo.cpp b/backends/platform/sdl/miyoo/miyoo.cpp
index b6ef849ccd0..95f5c83fc87 100644
--- a/backends/platform/sdl/miyoo/miyoo.cpp
+++ b/backends/platform/sdl/miyoo/miyoo.cpp
@@ -59,12 +59,22 @@ static const Common::KeyTableEntry odKeyboardButtons[] = {
 	{ "JOY_B",		Common::KEYCODE_LCTRL,		_s("B")			},
 	{ "JOY_X",		Common::KEYCODE_LSHIFT,		_s("X")			},
 	{ "JOY_Y",		Common::KEYCODE_LALT,		_s("Y")			},
+	{ "JOY_BACK",		Common::KEYCODE_RCTRL,		_s("Select")		},
+	{ "JOY_START",		Common::KEYCODE_RETURN,		_s("Start")		},
+	{ "JOY_LEFT_SHOULDER",	Common::KEYCODE_e,		_s("L")			},
+	{ "JOY_RIGHT_SHOULDER", Common::KEYCODE_t,		_s("R")			},
+	{ "JOY_UP",		Common::KEYCODE_UP,		_s("D-pad Up")	},
+	{ "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")	},
+	{ "JOY_LEFT_STICK",     Common::KEYCODE_TAB,		_s("L2")		},
+	{ "JOY_RIGHT_STICK",    Common::KEYCODE_BACKSPACE,	_s("R2")		},
+	{ "JOY_GUIDE",		Common::KEYCODE_ESCAPE,		_s("Menu")	 	},
 #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")			},
@@ -78,20 +88,10 @@ static const Common::KeyTableEntry odKeyboardButtons[] = {
 	{ "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			}
 };
 
-static const Common::HardwareInputTableEntry odJoystickButtons[] = {
-	{ "JOY_LEFT_TRIGGER",	Common::JOYSTICK_BUTTON_LEFT_STICK,	_s("L3")	 },
-	{ nullptr,		0,					nullptr		 }
-};
-
-static const Common::AxisTableEntry odJoystickAxes[] = {
-	{ "JOY_LEFT_STICK_X",  Common::JOYSTICK_AXIS_LEFT_STICK_X,  Common::kAxisTypeFull, _s("Left Stick X")  },
-	{ "JOY_LEFT_STICK_Y",  Common::JOYSTICK_AXIS_LEFT_STICK_Y,  Common::kAxisTypeFull, _s("Left Stick Y")  },
-	{ nullptr,	       0,				    Common::kAxisTypeFull, nullptr	       }
-};
-
 Common::KeymapperDefaultBindings *OSystem_SDL_Miyoo::getKeymapperDefaultBindings() {
 	Common::KeymapperDefaultBindings *keymapperDefaultBindings = new Common::KeymapperDefaultBindings();
 
@@ -197,7 +197,7 @@ bool OSystem_SDL_Miyoo::hasFeature(Feature f) {
 
 void OSystem_SDL_Miyoo::setFeatureState(Feature f, bool enable) {
 	OSystem_SDL::setFeatureState(f, enable);
-	}
+}
 
 bool OSystem_SDL_Miyoo::getFeatureState(Feature f) {
 	return OSystem_SDL::getFeatureState(f);
@@ -210,9 +210,7 @@ Common::HardwareInputSet *OSystem_SDL_Miyoo::getHardwareInputSet() {
 
 	// Users may use USB mice - keyboards currently not possible with SDL1 as it conflicts with gpios
 	inputSet->addHardwareInputSet(new MouseHardwareInputSet(defaultMouseButtons));
-	//inputSet->addHardwareInputSet(new KeyboardHardwareInputSet(defaultKeys, defaultModifiers));
 	inputSet->addHardwareInputSet(new KeyboardHardwareInputSet(odKeyboardButtons, defaultModifiers));
-	inputSet->addHardwareInputSet(new JoystickHardwareInputSet(odJoystickButtons, odJoystickAxes));
 
 	return inputSet;
 }




More information about the Scummvm-git-logs mailing list