ANDROID: Use the dedicated GUI option for enabling the touchpad mode
This commit is contained in:
parent
4c38b454fe
commit
0361373700
1 changed files with 13 additions and 4 deletions
|
@ -343,14 +343,16 @@ void OSystem_Android::initBackend() {
|
||||||
|
|
||||||
ConfMan.set("fullscreen", "true");
|
ConfMan.set("fullscreen", "true");
|
||||||
ConfMan.registerDefault("aspect_ratio", true);
|
ConfMan.registerDefault("aspect_ratio", true);
|
||||||
|
ConfMan.registerDefault("touchpad_mouse_mode", true);
|
||||||
|
|
||||||
ConfMan.setInt("autosave_period", 0);
|
ConfMan.setInt("autosave_period", 0);
|
||||||
ConfMan.setBool("FM_high_quality", false);
|
ConfMan.setBool("FM_high_quality", false);
|
||||||
ConfMan.setBool("FM_medium_quality", true);
|
ConfMan.setBool("FM_medium_quality", true);
|
||||||
|
|
||||||
// TODO hackity hack
|
if (ConfMan.hasKey("touchpad_mouse_mode"))
|
||||||
if (ConfMan.hasKey("multi_midi"))
|
_touchpad_mode = ConfMan.getBool("touchpad_mouse_mode");
|
||||||
_touchpad_mode = !ConfMan.getBool("multi_midi");
|
else
|
||||||
|
ConfMan.setBool("touchpad_mouse_mode", true);
|
||||||
|
|
||||||
// must happen before creating TimerManager to avoid race in
|
// must happen before creating TimerManager to avoid race in
|
||||||
// creating EventManager
|
// creating EventManager
|
||||||
|
@ -402,7 +404,8 @@ bool OSystem_Android::hasFeature(Feature f) {
|
||||||
f == kFeatureOpenGL ||
|
f == kFeatureOpenGL ||
|
||||||
#endif
|
#endif
|
||||||
f == kFeatureOverlaySupportsAlpha ||
|
f == kFeatureOverlaySupportsAlpha ||
|
||||||
f == kFeatureOpenUrl);
|
f == kFeatureOpenUrl ||
|
||||||
|
f == kFeatureTouchpadMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSystem_Android::setFeatureState(Feature f, bool enable) {
|
void OSystem_Android::setFeatureState(Feature f, bool enable) {
|
||||||
|
@ -429,6 +432,10 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
|
||||||
if (!enable)
|
if (!enable)
|
||||||
disableCursorPalette();
|
disableCursorPalette();
|
||||||
break;
|
break;
|
||||||
|
case kFeatureTouchpadMode:
|
||||||
|
ConfMan.setBool("touchpad_mouse_mode", enable);
|
||||||
|
_touchpad_mode = enable;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -446,6 +453,8 @@ bool OSystem_Android::getFeatureState(Feature f) {
|
||||||
return _virtcontrols_on;
|
return _virtcontrols_on;
|
||||||
case kFeatureCursorPalette:
|
case kFeatureCursorPalette:
|
||||||
return _use_mouse_palette;
|
return _use_mouse_palette;
|
||||||
|
case kFeatureTouchpadMode:
|
||||||
|
return ConfMan.getBool("touchpad_mouse_mode");
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue