diff options
author | Chris Apers | 2007-01-21 14:15:35 +0000 |
---|---|---|
committer | Chris Apers | 2007-01-21 14:15:35 +0000 |
commit | dd03b8f84b50fd466f4543cd6e9d54518d3c3f17 (patch) | |
tree | 8d9aa07f278a7de956fcb6717b6e82f45794762e /backends/platform/PalmOS/Src/os5_event.cpp | |
parent | 0147a831805d326d6d9b9db68925a19c46c26a2d (diff) | |
download | scummvm-rg350-dd03b8f84b50fd466f4543cd6e9d54518d3c3f17.tar.gz scummvm-rg350-dd03b8f84b50fd466f4543cd6e9d54518d3c3f17.tar.bz2 scummvm-rg350-dd03b8f84b50fd466f4543cd6e9d54518d3c3f17.zip |
Cleanup event code
Added key up for mouse buttons so that we can control Gobliiins and Touche properly
svn-id: r25147
Diffstat (limited to 'backends/platform/PalmOS/Src/os5_event.cpp')
-rw-r--r-- | backends/platform/PalmOS/Src/os5_event.cpp | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/backends/platform/PalmOS/Src/os5_event.cpp b/backends/platform/PalmOS/Src/os5_event.cpp index a1b07a0460..1e1c8c393e 100644 --- a/backends/platform/PalmOS/Src/os5_event.cpp +++ b/backends/platform/PalmOS/Src/os5_event.cpp @@ -38,40 +38,48 @@ void OSystem_PalmOS5::get_coordinates(EventPtr ev, Coord &x, Coord &y) { } bool OSystem_PalmOS5::check_event(Event &event, EventPtr ev) { - if (ev->eType == keyDownEvent) { + if (ev->eType == keyUpEvent) { switch (ev->data.keyDown.chr) { + case vchrHard3: + event.type = EVENT_LBUTTONUP; + event.mouse.x = _mouseCurState.x; + event.mouse.y = _mouseCurState.y; + return true; + case vchrHard4: - _lastKey = kKeyNone; - event.type = EVENT_RBUTTONDOWN; + event.type = EVENT_RBUTTONUP; event.mouse.x = _mouseCurState.x; event.mouse.y = _mouseCurState.y; return true; } - - if (_keyMouse.hasMore) { - switch (ev->data.keyDown.chr) { - // 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); + } else if (ev->eType == keyDownEvent) { + switch (ev->data.keyDown.chr) { + + // 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 - - // F5 = menu - case vchrHard3: - _lastKey = kKeyNone; - event.type = EVENT_KEYDOWN; - event.kbd.keycode = 319; - event.kbd.ascii = 319; - event.kbd.flags = 0; - return true; - } + +// case 0x1B05: + case vchrHard2: + setFeatureState(kFeatureAspectRatioCorrection, 0); + return false; // not a key + + case vchrHard3: + event.type = EVENT_RBUTTONDOWN; + event.mouse.x = _mouseCurState.x; + event.mouse.y = _mouseCurState.y; + return true; + + case vchrHard4: + event.type = EVENT_RBUTTONDOWN; + event.mouse.x = _mouseCurState.x; + event.mouse.y = _mouseCurState.y; + return true; } } |