[Scummvm-cvs-logs] SF.net SVN: scummvm: [31922] scummvm/trunk/gui/newgui.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed May 7 14:12:19 CEST 2008


Revision: 31922
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31922&view=rev
Author:   fingolfin
Date:     2008-05-07 05:12:18 -0700 (Wed, 07 May 2008)

Log Message:
-----------
minor tweak to the GUI double click handling code

Modified Paths:
--------------
    scummvm/trunk/gui/newgui.cpp

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2008-05-07 12:11:23 UTC (rev 31921)
+++ scummvm/trunk/gui/newgui.cpp	2008-05-07 12:12:18 UTC (rev 31922)
@@ -219,6 +219,7 @@
 	Dialog *activeDialog = getTopDialog();
 	bool didSaveState = false;
 	int button;
+	uint32 time;
 
 	if (activeDialog == 0)
 		return;
@@ -252,7 +253,6 @@
 		_system->updateScreen();
 
 		Common::Event event;
-		uint32 time = _system->getMillis();
 
 		while (eventMan->pollEvent(event)) {
 			if (activeDialog != getTopDialog() && event.type != Common::EVENT_QUIT && event.type != Common::EVENT_SCREEN_CHANGED)
@@ -288,6 +288,7 @@
 			case Common::EVENT_LBUTTONDOWN:
 			case Common::EVENT_RBUTTONDOWN:
 				button = (event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2);
+				time = _system->getMillis();
 				if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay)
 							&& ABS(_lastClick.x - event.mouse.x) < 3
 							&& ABS(_lastClick.y - event.mouse.y) < 3) {


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