aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-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: