aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/PalmOS/Src/os5_event.cpp
diff options
context:
space:
mode:
authorChris Apers2007-05-01 10:12:55 +0000
committerChris Apers2007-05-01 10:12:55 +0000
commit4624769069de808ef0aa561d53700c1bf5c7279e (patch)
tree99f20fba5a3e26114d7735550699f79ec02fd9f2 /backends/platform/PalmOS/Src/os5_event.cpp
parent532311576e053c7a5e08c620cac71d74b976be8b (diff)
downloadscummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.tar.gz
scummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.tar.bz2
scummvm-rg350-4624769069de808ef0aa561d53700c1bf5c7279e.zip
- Prevent lose of events
- Added hard arrow keys support - Revamped mouse code to prevent duplication and get rid of fixed size mouse buffer - Reviewed event code (more work needed for OS5 and keyup emulation) - Cleanup svn-id: r26699
Diffstat (limited to 'backends/platform/PalmOS/Src/os5_event.cpp')
-rw-r--r--backends/platform/PalmOS/Src/os5_event.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/backends/platform/PalmOS/Src/os5_event.cpp b/backends/platform/PalmOS/Src/os5_event.cpp
index 8af2a717a7..85a3b49426 100644
--- a/backends/platform/PalmOS/Src/os5_event.cpp
+++ b/backends/platform/PalmOS/Src/os5_event.cpp
@@ -37,19 +37,12 @@ void OSystem_PalmOS5::get_coordinates(EventPtr ev, Coord &x, Coord &y) {
}
}
-bool OSystem_PalmOS5::check_event(Event &event, EventPtr ev) {
+bool OSystem_PalmOS5::check_event(Common::Event &event, EventPtr ev) {
if (ev->eType == keyUpEvent) {
- switch (ev->data.keyDown.chr) {
+ switch (ev->data.keyUp.chr) {
case vchrHard3:
- event.type = Common::EVENT_LBUTTONUP;
- event.mouse.x = _mouseCurState.x;
- event.mouse.y = _mouseCurState.y;
- return true;
-
case vchrHard4:
- event.type = Common::EVENT_RBUTTONUP;
- event.mouse.x = _mouseCurState.x;
- event.mouse.y = _mouseCurState.y;
+ // will be handled by hard keys
return true;
}
@@ -59,23 +52,24 @@ bool OSystem_PalmOS5::check_event(Event &event, EventPtr ev) {
// hot swap gfx
// case 0x1B04:
case vchrHard1:
- printf("swap\n");
if (OPTIONS_TST(kOptCollapsible))
hotswap_gfx_mode(_mode == GFX_WIDE ? GFX_NORMAL: GFX_WIDE);
return false; // not a key
// case 0x1B05:
case vchrHard2:
- setFeatureState(kFeatureAspectRatioCorrection, 0);
- return false; // not a key
+ setFeatureState(kFeatureAspectRatioCorrection, 0);
+ return false; // not a key
case vchrHard3:
- event.type = Common::EVENT_RBUTTONDOWN;
+ _keyExtraPressed |= _keyExtra.bitActionA;
+ event.type = Common::EVENT_LBUTTONDOWN;
event.mouse.x = _mouseCurState.x;
event.mouse.y = _mouseCurState.y;
return true;
case vchrHard4:
+ _keyExtraPressed |= _keyExtra.bitActionB;
event.type = Common::EVENT_RBUTTONDOWN;
event.mouse.x = _mouseCurState.x;
event.mouse.y = _mouseCurState.y;