aboutsummaryrefslogtreecommitdiff
path: root/backends/events
diff options
context:
space:
mode:
authorlubomyr2017-02-18 17:58:47 +0200
committerlubomyr2017-02-18 17:58:47 +0200
commit75a08488f91117ee9f7f02163900a2dfd05758ad (patch)
tree1263f76752a05e27052a2b93be04076d5afc3fdb /backends/events
parent2c321731466729221444d96f6478f75a3b12f273 (diff)
downloadscummvm-rg350-75a08488f91117ee9f7f02163900a2dfd05758ad.tar.gz
scummvm-rg350-75a08488f91117ee9f7f02163900a2dfd05758ad.tar.bz2
scummvm-rg350-75a08488f91117ee9f7f02163900a2dfd05758ad.zip
ANDROIDSDL: code refactoring and optimization
Diffstat (limited to 'backends/events')
-rw-r--r--backends/events/androidsdl/androidsdl-events.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/events/androidsdl/androidsdl-events.cpp b/backends/events/androidsdl/androidsdl-events.cpp
index 41080198ce..125f411289 100644
--- a/backends/events/androidsdl/androidsdl-events.cpp
+++ b/backends/events/androidsdl/androidsdl-events.cpp
@@ -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