aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorCameron Cawley2018-07-27 19:01:06 +0100
committerEugene Sandulenko2018-07-29 09:47:15 +0200
commit8120a22a40ae0ae330c3306bf6543bb8895551bd (patch)
treeef6a3ffc91c26eb0857f49a69920da87d48ec53d /backends/platform
parent7730fbb36e7625423875abd226d4eb413d0bd198 (diff)
downloadscummvm-rg350-8120a22a40ae0ae330c3306bf6543bb8895551bd.tar.gz
scummvm-rg350-8120a22a40ae0ae330c3306bf6543bb8895551bd.tar.bz2
scummvm-rg350-8120a22a40ae0ae330c3306bf6543bb8895551bd.zip
ANDROID: Use the dedicated GUI option for enabling the touchpad mode
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/android/android.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 4e4417400c..691114e9e3 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -347,14 +347,16 @@ void OSystem_Android::initBackend() {
ConfMan.registerDefault("fullscreen", true);
ConfMan.registerDefault("aspect_ratio", true);
+ ConfMan.registerDefault("touchpad_mouse_mode", true);
ConfMan.setInt("autosave_period", 0);
ConfMan.setBool("FM_high_quality", false);
ConfMan.setBool("FM_medium_quality", true);
- // TODO hackity hack
- if (ConfMan.hasKey("multi_midi"))
- _touchpad_mode = !ConfMan.getBool("multi_midi");
+ if (ConfMan.hasKey("touchpad_mouse_mode"))
+ _touchpad_mode = ConfMan.getBool("touchpad_mouse_mode");
+ else
+ ConfMan.setBool("touchpad_mouse_mode", true);
// must happen before creating TimerManager to avoid race in
// creating EventManager
@@ -402,7 +404,8 @@ bool OSystem_Android::hasFeature(Feature f) {
f == kFeatureCursorPalette ||
f == kFeatureVirtualKeyboard ||
f == kFeatureOverlaySupportsAlpha ||
- f == kFeatureOpenUrl);
+ f == kFeatureOpenUrl ||
+ f == kFeatureTouchpadMode);
}
void OSystem_Android::setFeatureState(Feature f, bool enable) {
@@ -426,6 +429,10 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
if (!enable)
disableCursorPalette();
break;
+ case kFeatureTouchpadMode:
+ ConfMan.setBool("touchpad_mouse_mode", enable);
+ _touchpad_mode = enable;
+ break;
default:
break;
}
@@ -441,6 +448,8 @@ bool OSystem_Android::getFeatureState(Feature f) {
return _virtkeybd_on;
case kFeatureCursorPalette:
return _use_mouse_palette;
+ case kFeatureTouchpadMode:
+ return ConfMan.getBool("touchpad_mouse_mode");
default:
return false;
}