aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2014-04-29 00:26:35 +0100
committerD G Turner2014-04-29 00:26:35 +0100
commitdd92fa45b4740ffdf818d362a6fb7e3e76fab687 (patch)
tree29f7c596a5174114fd5c57616071645af724c785
parent1544feb02cb72c1d63f2d5da743412b4b887ab14 (diff)
downloadscummvm-rg350-dd92fa45b4740ffdf818d362a6fb7e3e76fab687.tar.gz
scummvm-rg350-dd92fa45b4740ffdf818d362a6fb7e3e76fab687.tar.bz2
scummvm-rg350-dd92fa45b4740ffdf818d362a6fb7e3e76fab687.zip
PS3: Use virtual keyboard event directly, rather than using keycode.
As the virtual keyboard trigger has been moved to CTRL-F7, the previous code which generates a unmodified F7 event to do this will not work. Rather than just adding the CTRL modifier, this code changes the backend to directly generate the virtual keyboard trigger event directly. This avoids any future breakage if the key combination is changed again.
-rw-r--r--backends/events/ps3sdl/ps3sdl-events.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/backends/events/ps3sdl/ps3sdl-events.cpp b/backends/events/ps3sdl/ps3sdl-events.cpp
index 1a854436f1..0f6e01857b 100644
--- a/backends/events/ps3sdl/ps3sdl-events.cpp
+++ b/backends/events/ps3sdl/ps3sdl-events.cpp
@@ -72,9 +72,9 @@ bool PS3SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event)
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
break;
case BTN_SELECT: // Virtual keyboard
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
+#endif
break;
case BTN_SQUARE: // Escape
event.type = Common::EVENT_KEYDOWN;
@@ -110,9 +110,7 @@ bool PS3SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
break;
case BTN_SELECT: // Virtual keyboard
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+ // Handled in key down
break;
case BTN_SQUARE: // Escape
event.type = Common::EVENT_KEYUP;