Skip to content
Permalink
Browse files

ANDROID: Use the dedicated GUI option for enabling the touchpad mode

  • Loading branch information...
ccawley2011 authored and sev- committed Jul 27, 2018
1 parent 7730fbb commit 8120a22a40ae0ae330c3306bf6543bb8895551bd
Showing with 13 additions and 4 deletions.
  1. +13 −4 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;
}

0 comments on commit 8120a22

Please sign in to comment.
You can’t perform that action at this time.