mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 10:41:55 +00:00
WEBOS: Fixed ESCAPE and MENU key on WebOS 1
This commit is contained in:
parent
a6dc171255
commit
cc0d8b6252
@ -95,6 +95,8 @@ void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
|
||||
event.kbd.flags |= Common::KBD_SHIFT;
|
||||
if (mod & KMOD_CTRL)
|
||||
event.kbd.flags |= Common::KBD_CTRL;
|
||||
|
||||
// Holding down the gesture area emulates the ALT key
|
||||
if (gestureDown)
|
||||
event.kbd.flags |= Common::KBD_ALT;
|
||||
}
|
||||
@ -115,6 +117,14 @@ bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ensure that ALT key (Gesture down) is ignored when back or forward
|
||||
// gesture is detected. This is needed for WebOS 1 which releases the
|
||||
// gesture tap AFTER the backward gesture event and not BEFORE (Like
|
||||
// WebOS 2).
|
||||
if (ev.key.keysym.sym == 27 || ev.key.keysym.sym == 229) {
|
||||
gestureDown = false;
|
||||
}
|
||||
|
||||
// Call original SDL key handler.
|
||||
return SdlEventSource::handleKeyDown(ev, event);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user