[Scummvm-cvs-logs] SF.net SVN: scummvm: [24402] scummvm/branches/branch-0-9-0/backends/wince/ CEkeys/EventsBuffer.cpp

knakos at users.sourceforge.net knakos at users.sourceforge.net
Sat Oct 21 13:07:00 CEST 2006


Revision: 24402
          http://svn.sourceforge.net/scummvm/?rev=24402&view=rev
Author:   knakos
Date:     2006-10-21 04:06:54 -0700 (Sat, 21 Oct 2006)

Log Message:
-----------
Fix multiple simulated mouse key events bug.

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/backends/wince/CEkeys/EventsBuffer.cpp

Modified: scummvm/branches/branch-0-9-0/backends/wince/CEkeys/EventsBuffer.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/backends/wince/CEkeys/EventsBuffer.cpp	2006-10-21 10:50:19 UTC (rev 24401)
+++ scummvm/branches/branch-0-9-0/backends/wince/CEkeys/EventsBuffer.cpp	2006-10-21 11:06:54 UTC (rev 24402)
@@ -53,7 +53,10 @@
 
 	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 @@
 
 	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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list