[Scummvm-cvs-logs] CVS: scummvm/queen input.cpp,1.38,1.39

Gregory Montoir cyx at users.sourceforge.net
Thu Oct 13 11:49:46 CEST 2005


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27991/queen

Modified Files:
	input.cpp 
Log Message:
Some cleanup. Updated mouse position on EVENT_RBUTTONDOWN for WinCE and PalmOS, does it help bug #1293385 ?

Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/input.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- input.cpp	2 Sep 2005 10:58:21 -0000	1.38
+++ input.cpp	13 Oct 2005 18:48:33 -0000	1.39
@@ -83,17 +83,12 @@
 }
 
 void Input::delay(uint amount) {
-
-	OSystem::Event event;
-
-	uint32 start = _system->getMillis();
-	uint32 cur = start;
-
 	if (_idleTime < DELAY_SCREEN_BLANKER) {
 		_idleTime += amount;
 	}
-
+	uint32 end = _system->getMillis() + amount;
 	do {
+		OSystem::Event event;
 		while (_system->pollEvent(event)) {
 			_idleTime = 0;
 			switch (event.type) {
@@ -124,6 +119,10 @@
 
 			case OSystem::EVENT_RBUTTONDOWN:
 				_mouseButton |= MOUSE_RBUTTON;
+#if defined(_WIN32_WCE) || defined(__PALM_OS__)
+				_mouse_x = event.mouse.x;
+				_mouse_y = event.mouse.y;
+#endif
 				break;
 
 			case OSystem::EVENT_QUIT:
@@ -139,13 +138,9 @@
 		if (amount == 0)
 			break;
 
-		uint this_delay = 20; // 1?
-		if (this_delay > amount)
-			this_delay = amount;
-		_system->delayMillis(this_delay);
+		_system->delayMillis((amount > 20) ? 20 : amount);
 #endif
-		cur = _system->getMillis();
-	} while (cur < start + amount);
+	} while (_system->getMillis() < end);
 }
 
 int Input::checkKeys() {





More information about the Scummvm-git-logs mailing list