aboutsummaryrefslogtreecommitdiff
path: root/backends/events
diff options
context:
space:
mode:
authorlubomyr2017-02-01 14:34:32 +0200
committerlubomyr2017-02-01 14:34:32 +0200
commit2d7803c22f96f50b7541dd80cb8158cf23ba0ddf (patch)
tree53b5fd4c6d27d99ba1fb14fa4bff8aea9d8b2176 /backends/events
parent9cdda5c045bed4d3a8fe5fc841225f735624e341 (diff)
downloadscummvm-rg350-2d7803c22f96f50b7541dd80cb8158cf23ba0ddf.tar.gz
scummvm-rg350-2d7803c22f96f50b7541dd80cb8158cf23ba0ddf.tar.bz2
scummvm-rg350-2d7803c22f96f50b7541dd80cb8158cf23ba0ddf.zip
ANDROIDSDL: code optimization
Diffstat (limited to 'backends/events')
-rw-r--r--backends/events/androidsdl/androidsdl-events.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/backends/events/androidsdl/androidsdl-events.cpp b/backends/events/androidsdl/androidsdl-events.cpp
index 0adcff817e..41080198ce 100644
--- a/backends/events/androidsdl/androidsdl-events.cpp
+++ b/backends/events/androidsdl/androidsdl-events.cpp
@@ -26,7 +26,6 @@
#include "backends/events/androidsdl/androidsdl-events.h"
#include "backends/platform/androidsdl/androidsdl-sdl.h"
-#include <SDL_screenkeyboard.h>
bool AndroidSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
if (ev.button.button == SDL_BUTTON_LEFT)
@@ -43,16 +42,9 @@ bool AndroidSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &
else if (ev.button.button == SDL_BUTTON_MIDDLE) {
event.type = Common::EVENT_MBUTTONDOWN;
- static int show_onscreen = 0;
- if (show_onscreen == 0) {
- SDL_ANDROID_SetScreenKeyboardShown(0);
- show_onscreen++;
- } else if (show_onscreen==1) {
- SDL_ANDROID_SetScreenKeyboardShown(1);
- show_onscreen++;
- }
- if (show_onscreen == 2)
- show_onscreen = 0;
+ static bool show_onscreen = g_system->getFeatureState(OSystem::kFeatureOnScreenControl);
+ show_onscreen = !show_onscreen;
+ g_system->setFeatureState(OSystem::kFeatureOnScreenControl, show_onscreen);
}
#endif
else