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

antoniou79 a.antoniou79 at gmail.com
Thu Feb 27 06:23:20 UTC 2020


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:
bd1e2b8b87 ANDROID: Notes on superseded swap_menu_and_back_buttons conf key


Commit: bd1e2b8b8758a42af337552e27b5e9645a6cfb81
    https://github.com/scummvm/scummvm/commit/bd1e2b8b8758a42af337552e27b5e9645a6cfb81
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-02-27T08:23:09+02:00

Commit Message:
ANDROID: Notes on superseded swap_menu_and_back_buttons conf key

Changed paths:
    backends/platform/android/android.cpp


diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 78b9fbdcc4..5869fd0094 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -310,6 +310,10 @@ void OSystem_Android::initBackend() {
 	ConfMan.registerDefault("aspect_ratio", true);
 	ConfMan.registerDefault("touchpad_mouse_mode", true);
 	ConfMan.registerDefault("onscreen_control", true);
+	// The swap_menu_and_back is a legacy configuration key
+	// It is no longer relevant, after introducing the keymapper functionality
+	// since the behaviour of the menu and back buttons is now handled by the keymapper.
+	// The key is thus registered to default to a "false" value
 	ConfMan.registerDefault("swap_menu_and_back", false);
 
 	ConfMan.setInt("autosave_period", 0);
@@ -416,6 +420,10 @@ bool OSystem_Android::getFeatureState(Feature f) {
 Common::KeymapperDefaultBindings *OSystem_Android::getKeymapperDefaultBindings() {
 	Common::KeymapperDefaultBindings *keymapperDefaultBindings = new Common::KeymapperDefaultBindings();
 
+	// The swap_menu_and_back is a legacy configuration key
+	// It is only checked here for compatibility with old config files
+	// where it may have been set as "true"
+	// TODO Why not just ignore it entirely anyway?
 	if (ConfMan.hasKey("swap_menu_and_back")  && ConfMan.getBool("swap_menu_and_back")) {
 		keymapperDefaultBindings->setDefaultBinding(Common::kGlobalKeymapName, "MENU", "AC_BACK");
 		keymapperDefaultBindings->setDefaultBinding("engine-default", Common::kStandardActionSkip, "MENU");




More information about the Scummvm-git-logs mailing list