[Scummvm-git-logs] scummvm master -> f9f55d1af3f2570529d7c0b5159c034aa2507bc7

sev- sev at scummvm.org
Mon Aug 29 19:37:33 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f9f55d1af3 ANDROIDSDL: Fix menu button


Commit: f9f55d1af3f2570529d7c0b5159c034aa2507bc7
    https://github.com/scummvm/scummvm/commit/f9f55d1af3f2570529d7c0b5159c034aa2507bc7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-29T19:37:25+02:00

Commit Message:
ANDROIDSDL: Fix menu button

Changed paths:
    backends/events/androidsdl/androidsdl-events.cpp



diff --git a/backends/events/androidsdl/androidsdl-events.cpp b/backends/events/androidsdl/androidsdl-events.cpp
index bd8045e..7ea8ff1 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.





More information about the Scummvm-git-logs mailing list