aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Nakos2008-08-13 19:13:53 +0000
committerKostas Nakos2008-08-13 19:13:53 +0000
commit5a54dc61a43a7f911a2ef230da9258e3b41fd691 (patch)
treed0421cdc094d92eea0c2636f5ac2d11172d41d21
parent0f95bb9fd516ad9d61f9d8ccc492cdb1c69cfc87 (diff)
downloadscummvm-rg350-5a54dc61a43a7f911a2ef230da9258e3b41fd691.tar.gz
scummvm-rg350-5a54dc61a43a7f911a2ef230da9258e3b41fd691.tar.bz2
scummvm-rg350-5a54dc61a43a7f911a2ef230da9258e3b41fd691.zip
fix bug #1910057: FT multifunction
svn-id: r33839
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.cpp3
-rw-r--r--backends/platform/wince/wince-sdl.cpp14
2 files changed, 12 insertions, 5 deletions
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp
index 92a21ab7ad..f31a77570f 100644
--- a/backends/platform/wince/CEkeys/EventsBuffer.cpp
+++ b/backends/platform/wince/CEkeys/EventsBuffer.cpp
@@ -36,9 +36,8 @@ namespace CEKEYS {
key->setKey(key->keycode());
ev.type = (pushed ? SDL_KEYDOWN : SDL_KEYUP);
- ev.key.keysym.mod = (SDLMod)key->flags();
+ ev.key.keysym.unicode = (SDLMod)key->flags(); // HACK: put the flags into the unused unicode field
ev.key.keysym.sym = (SDLKey)key->keycode();
- ev.key.keysym.unicode = key->keycode();
ev.key.keysym.mod = KMOD_RESERVED;
return (SDL_PushEvent(&ev) == 0);
}
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 8334d70ac8..48f157f6ff 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -2262,15 +2262,18 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
_lastKeyPressed = 0;
event.type = Common::EVENT_PREDICTIVE_DIALOG;
return true;
- }
-
- event.type = Common::EVENT_KEYDOWN;
+ } event.type = Common::EVENT_KEYDOWN;
if (!_unfilteredkeys)
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
else
event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
+ if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
+ event.kbd.ascii ^= 0x20;
+ event.kbd.flags = Common::KBD_SHIFT;
+ }
+
return true;
case SDL_KEYUP:
@@ -2298,6 +2301,11 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
+ if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
+ event.kbd.ascii ^= 0x20;
+ event.kbd.flags = Common::KBD_SHIFT;
+ }
+
return true;
case SDL_MOUSEMOTION: