aboutsummaryrefslogtreecommitdiff
path: root/backends/events/androidsdl/androidsdl-events.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-29 19:37:05 +0200
committerEugene Sandulenko2016-08-29 19:37:25 +0200
commitf9f55d1af3f2570529d7c0b5159c034aa2507bc7 (patch)
treec0c20ccaa01d329a1a5492a3728dd9f7738ae715 /backends/events/androidsdl/androidsdl-events.cpp
parent7c3461d1b02f912de21b8f78ce42c0c969e86eb4 (diff)
downloadscummvm-rg350-f9f55d1af3f2570529d7c0b5159c034aa2507bc7.tar.gz
scummvm-rg350-f9f55d1af3f2570529d7c0b5159c034aa2507bc7.tar.bz2
scummvm-rg350-f9f55d1af3f2570529d7c0b5159c034aa2507bc7.zip
ANDROIDSDL: Fix menu button
Diffstat (limited to 'backends/events/androidsdl/androidsdl-events.cpp')
-rw-r--r--backends/events/androidsdl/androidsdl-events.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/backends/events/androidsdl/androidsdl-events.cpp b/backends/events/androidsdl/androidsdl-events.cpp
index bd8045ec62..7ea8ff1dc1 100644
--- a/backends/events/androidsdl/androidsdl-events.cpp
+++ b/backends/events/androidsdl/androidsdl-events.cpp
@@ -43,17 +43,16 @@ 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++;
+ 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++;
}
- else if (show_onscreen==1) {
- SDL_ANDROID_SetScreenKeyboardShown(1);
- show_onscreen++;
- }
- if (show_onscreen==2)
- show_onscreen=0;
+ if (show_onscreen == 2)
+ show_onscreen = 0;
}
#endif
else
@@ -68,7 +67,9 @@ bool AndroidSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
if (false) {}
if (ev.key.keysym.sym == SDLK_LCTRL) {
- ev.key.keysym.sym = SDLK_F5;
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_F5;
+ return true;
} else {
// Let the events fall through if we didn't change them, this may not be the best way to
// set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.