diff options
author | Cameron Cawley | 2019-08-18 22:58:13 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-08-20 14:32:50 +0300 |
commit | 12c232eefc7c78f7d40da9894e395dee4ce6d8c2 (patch) | |
tree | 5a00b4bb1754d4fe6d2f6608851312206475f313 /backends/platform/android/android.cpp | |
parent | c2054682f0f20ad284582b0717d0298df401a228 (diff) | |
download | scummvm-rg350-12c232eefc7c78f7d40da9894e395dee4ce6d8c2.tar.gz scummvm-rg350-12c232eefc7c78f7d40da9894e395dee4ce6d8c2.tar.bz2 scummvm-rg350-12c232eefc7c78f7d40da9894e395dee4ce6d8c2.zip |
ANDROID: Add a button to show the virtual keyboard
Diffstat (limited to 'backends/platform/android/android.cpp')
-rw-r--r-- | backends/platform/android/android.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index f3dc0b5876..2ae36c8073 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -350,6 +350,7 @@ void OSystem_Android::initBackend() { ConfMan.registerDefault("fullscreen", true); ConfMan.registerDefault("aspect_ratio", true); ConfMan.registerDefault("touchpad_mouse_mode", true); + ConfMan.registerDefault("onscreen_control", true); ConfMan.setInt("autosave_period", 0); ConfMan.setBool("FM_high_quality", false); @@ -360,6 +361,11 @@ void OSystem_Android::initBackend() { else ConfMan.setBool("touchpad_mouse_mode", true); + if (ConfMan.hasKey("onscreen_control")) + JNI::showKeyboardControl(ConfMan.getBool("onscreen_control")); + else + ConfMan.setBool("onscreen_control", true); + // must happen before creating TimerManager to avoid race in // creating EventManager setupKeymapper(); @@ -411,6 +417,7 @@ bool OSystem_Android::hasFeature(Feature f) { f == kFeatureOverlaySupportsAlpha || f == kFeatureOpenUrl || f == kFeatureTouchpadMode || + f == kFeatureOnScreenControl || f == kFeatureClipboardSupport); } @@ -439,6 +446,10 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) { ConfMan.setBool("touchpad_mouse_mode", enable); _touchpad_mode = enable; break; + case kFeatureOnScreenControl: + ConfMan.setBool("onscreen_control", enable); + JNI::showKeyboardControl(enable); + break; default: break; } @@ -456,6 +467,8 @@ bool OSystem_Android::getFeatureState(Feature f) { return _use_mouse_palette; case kFeatureTouchpadMode: return ConfMan.getBool("touchpad_mouse_mode"); + case kFeatureOnScreenControl: + return ConfMan.getBool("onscreen_control"); default: return false; } |