aboutsummaryrefslogtreecommitdiff
path: root/backends/events
diff options
context:
space:
mode:
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