[Scummvm-git-logs] scummvm master -> 8120a22a40ae0ae330c3306bf6543bb8895551bd
sev-
sev at scummvm.org
Sun Jul 29 09:47:18 CEST 2018
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:
8120a22a40 ANDROID: Use the dedicated GUI option for enabling the touchpad mode
Commit: 8120a22a40ae0ae330c3306bf6543bb8895551bd
https://github.com/scummvm/scummvm/commit/8120a22a40ae0ae330c3306bf6543bb8895551bd
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-07-29T09:47:15+02:00
Commit Message:
ANDROID: Use the dedicated GUI option for enabling the touchpad mode
Changed paths:
backends/platform/android/android.cpp
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 4e44174..691114e 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;
}
More information about the Scummvm-git-logs
mailing list