[Scummvm-cvs-logs] SF.net SVN: scummvm: [30068] scummvm/trunk
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Dec 29 10:48:50 CET 2007
Revision: 30068
http://scummvm.svn.sourceforge.net/scummvm/?rev=30068&view=rev
Author: dreammaster
Date: 2007-12-29 01:48:49 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
Added events for the middle mouse button - EVENT_MBUTTONDOWN and EVENT_MBUTTONUP
Modified Paths:
--------------
scummvm/trunk/backends/platform/sdl/events.cpp
scummvm/trunk/common/events.h
Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp 2007-12-29 04:27:04 UTC (rev 30067)
+++ scummvm/trunk/backends/platform/sdl/events.cpp 2007-12-29 09:48:49 UTC (rev 30068)
@@ -307,6 +307,10 @@
else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
event.type = Common::EVENT_WHEELDOWN;
#endif
+#if defined(SDL_BUTTON_MIDDLE)
+ else if (ev.button.button == SDL_BUTTON_MIDDLE)
+ event.type = Common::EVENT_MBUTTONDOWN;
+#endif
else
break;
@@ -319,6 +323,10 @@
event.type = Common::EVENT_LBUTTONUP;
else if (ev.button.button == SDL_BUTTON_RIGHT)
event.type = Common::EVENT_RBUTTONUP;
+#if defined(SDL_BUTTON_MIDDLE)
+ else if (ev.button.button == SDL_BUTTON_MIDDLE)
+ event.type = Common::EVENT_MBUTTONUP;
+#endif
else
break;
fillMouseEvent(event, ev.button.x, ev.button.y);
Modified: scummvm/trunk/common/events.h
===================================================================
--- scummvm/trunk/common/events.h 2007-12-29 04:27:04 UTC (rev 30067)
+++ scummvm/trunk/common/events.h 2007-12-29 09:48:49 UTC (rev 30068)
@@ -55,6 +55,8 @@
EVENT_RBUTTONUP = 7,
EVENT_WHEELUP = 8,
EVENT_WHEELDOWN = 9,
+ EVENT_MBUTTONDOWN = 13,
+ EVENT_MBUTTONUP = 14,
EVENT_QUIT = 10,
EVENT_SCREEN_CHANGED = 11,
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