aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince/CEkeys
diff options
context:
space:
mode:
authorKostas Nakos2006-10-21 11:12:46 +0000
committerKostas Nakos2006-10-21 11:12:46 +0000
commita15885656db00a5013c01381f4f61cc8a442977b (patch)
treec58adc4b76f471d4bfe644b7cb7ca184a1e61ff5 /backends/platform/wince/CEkeys
parent10f2c7cc57708dca04b8e9d434440fc28f9177de (diff)
downloadscummvm-rg350-a15885656db00a5013c01381f4f61cc8a442977b.tar.gz
scummvm-rg350-a15885656db00a5013c01381f4f61cc8a442977b.tar.bz2
scummvm-rg350-a15885656db00a5013c01381f4f61cc8a442977b.zip
Fix multiple simulated mouse key events bug (sync).
svn-id: r24403
Diffstat (limited to 'backends/platform/wince/CEkeys')
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp
index f89b851280..ca8c2eee58 100644
--- a/backends/platform/wince/CEkeys/EventsBuffer.cpp
+++ b/backends/platform/wince/CEkeys/EventsBuffer.cpp
@@ -53,7 +53,10 @@ namespace CEKEYS {
bool EventsBuffer::simulateMouseLeftClick(int x, int y, bool pushed) {
SDL_Event ev = {0};
+ static bool state = false;
+ if (pushed == state) return 0;
+ state = pushed;
ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
ev.button.button = SDL_BUTTON_LEFT;
ev.button.x = x;
@@ -63,7 +66,10 @@ namespace CEKEYS {
bool EventsBuffer::simulateMouseRightClick(int x, int y, bool pushed) {
SDL_Event ev = {0};
+ static bool state = false;
+ if (pushed == state) return 0;
+ state = pushed;
ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
ev.button.button = SDL_BUTTON_RIGHT;
ev.button.x = x;