diff options
Diffstat (limited to 'backends/platform/android/android.cpp')
-rw-r--r-- | backends/platform/android/android.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 7d5bce9c85..c1f8a6c493 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -102,7 +102,8 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) : _dpad_scale(4), _fingersDown(0), _trackball_scale(2), - _joystick_scale(10) { + _joystick_scale(10), + _swap_menu_and_back(false) { _fsFactory = new POSIXFilesystemFactory(); @@ -307,6 +308,7 @@ void OSystem_Android::initBackend() { ConfMan.registerDefault("aspect_ratio", true); ConfMan.registerDefault("touchpad_mouse_mode", true); ConfMan.registerDefault("onscreen_control", true); + ConfMan.registerDefault("swap_menu_and_back", false); ConfMan.setInt("autosave_period", 0); ConfMan.setBool("FM_high_quality", false); @@ -325,6 +327,11 @@ void OSystem_Android::initBackend() { else ConfMan.setBool("onscreen_control", true); + if (ConfMan.hasKey("swap_menu_and_back_buttons")) + _swap_menu_and_back = ConfMan.getBool("swap_menu_and_back_buttons"); + else + ConfMan.setBool("swap_menu_and_back_buttons", false); + // must happen before creating TimerManager to avoid race in // creating EventManager setupKeymapper(); @@ -365,6 +372,7 @@ bool OSystem_Android::hasFeature(Feature f) { f == kFeatureOpenUrl || f == kFeatureTouchpadMode || f == kFeatureOnScreenControl || + f == kFeatureSwapMenuAndBackButtons || f == kFeatureClipboardSupport) { return true; } @@ -387,6 +395,10 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) { ConfMan.setBool("onscreen_control", enable); JNI::showKeyboardControl(enable); break; + case kFeatureSwapMenuAndBackButtons: + ConfMan.setBool("swap_menu_and_back_buttons", enable); + _swap_menu_and_back = enable; + break; default: ModularBackend::setFeatureState(f, enable); break; @@ -401,6 +413,8 @@ bool OSystem_Android::getFeatureState(Feature f) { return ConfMan.getBool("touchpad_mouse_mode"); case kFeatureOnScreenControl: return ConfMan.getBool("onscreen_control"); + case kFeatureSwapMenuAndBackButtons: + return ConfMan.getBool("swap_menu_and_back_buttons"); default: return ModularBackend::getFeatureState(f); } |