aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorD G Turner2014-04-29 00:21:46 +0100
committerD G Turner2014-04-29 00:21:46 +0100
commit3ae0908967a3c5d526e139bb1a5da82da4793776 (patch)
tree34ace0204baf07c9a5af2d5092cda4c8f463e2c6 /backends
parentdc0c7bce4cfddc109775285798e9cadbf20f6253 (diff)
downloadscummvm-rg350-3ae0908967a3c5d526e139bb1a5da82da4793776.tar.gz
scummvm-rg350-3ae0908967a3c5d526e139bb1a5da82da4793776.tar.bz2
scummvm-rg350-3ae0908967a3c5d526e139bb1a5da82da4793776.zip
GPH: 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.
Diffstat (limited to 'backends')
-rw-r--r--backends/events/gph/gph-events.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 90b6a2a29d..88fc97d3d1 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -348,8 +348,7 @@ bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
if (BUTTON_STATE_L == true) {
#ifdef ENABLE_VKEYBD
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = mapKey(SDLK_F7, ev.key.keysym.mod, 0);
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
#else
event.kbd.keycode = Common::KEYCODE_0;
event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0);