mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
ANDROIDSDL: code refactoring and optimization
This commit is contained in:
@@ -42,9 +42,8 @@ bool AndroidSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &
|
||||
else if (ev.button.button == SDL_BUTTON_MIDDLE) {
|
||||
event.type = Common::EVENT_MBUTTONDOWN;
|
||||
|
||||
static bool show_onscreen = g_system->getFeatureState(OSystem::kFeatureOnScreenControl);
|
||||
show_onscreen = !show_onscreen;
|
||||
g_system->setFeatureState(OSystem::kFeatureOnScreenControl, show_onscreen);
|
||||
const bool show_onscreen = g_system->getFeatureState(OSystem::kFeatureOnScreenControl);
|
||||
g_system->setFeatureState(OSystem::kFeatureOnScreenControl, !show_onscreen);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
|
||||
@@ -51,7 +51,7 @@ void OSystem_ANDROIDSDL::initBackend() {
|
||||
swapMenuAndBackButtons(ConfMan.getBool("swap_menu_and_back"));
|
||||
|
||||
if (!ConfMan.hasKey("touchpad_mouse_mode")) {
|
||||
const bool enable = (SDL_ANDROID_GetMouseEmulationMode() == 0) ? false : true;
|
||||
const bool enable = SDL_ANDROID_GetMouseEmulationMode();
|
||||
ConfMan.setBool("touchpad_mouse_mode", enable);
|
||||
} else
|
||||
touchpadMode(ConfMan.getBool("touchpad_mouse_mode"));
|
||||
|
||||
Reference in New Issue
Block a user