aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2014-04-29 00:27:56 +0100
committerD G Turner2014-04-29 00:27:56 +0100
commitaafc17ed1e2e3ff13d43d024e00c1628b1f365a4 (patch)
tree78582925482c2a3103e6b8b5dab8fe0680c26c58
parentdd92fa45b4740ffdf818d362a6fb7e3e76fab687 (diff)
downloadscummvm-rg350-aafc17ed1e2e3ff13d43d024e00c1628b1f365a4.tar.gz
scummvm-rg350-aafc17ed1e2e3ff13d43d024e00c1628b1f365a4.tar.bz2
scummvm-rg350-aafc17ed1e2e3ff13d43d024e00c1628b1f365a4.zip
SAMSUNGTV: 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/samsungtvsdl/samsungtvsdl-events.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
index f5b919a060..61499b566d 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
@@ -38,10 +38,10 @@ bool SamsungTVSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
event.kbd.ascii = Common::ASCII_F5;
return true;
} else if (ev.key.keysym.sym == SDLK_F2 && ev.key.keysym.scancode == 21) {
- event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
+#ifdef ENABLE_VKEYBD
+ event.type = Common::EVENT_VIRTUAL_KEYBOARD;
return true;
+#endif
}
break;
}
@@ -54,11 +54,6 @@ bool SamsungTVSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
event.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = Common::ASCII_F5;
return true;
- } else if (ev.key.keysym.sym == SDLK_F2 && ev.key.keysym.scancode == 21) {
- event.type = Common::EVENT_KEYUP;
- event.kbd.keycode = Common::KEYCODE_F7;
- event.kbd.ascii = Common::ASCII_F7;
- return true;
}
break;
}