[Scummvm-cvs-logs] SF.net SVN: scummvm:[42965] scummvm/trunk/engines/cruise/cruise_main.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Aug 1 01:27:20 CEST 2009
Revision: 42965
http://scummvm.svn.sourceforge.net/scummvm/?rev=42965&view=rev
Author: dreammaster
Date: 2009-07-31 23:27:19 +0000 (Fri, 31 Jul 2009)
Log Message:
-----------
Fix bug with the event loop that was discarding pending events rather than leaving them to be processed in the following frame
Modified Paths:
--------------
scummvm/trunk/engines/cruise/cruise_main.cpp
Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp 2009-07-31 17:10:20 UTC (rev 42964)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp 2009-07-31 23:27:19 UTC (rev 42965)
@@ -1625,11 +1625,10 @@
bool manageEvents() {
Common::Event event;
- bool result = false;
Common::EventManager * eventMan = g_system->getEventManager();
- while (eventMan->pollEvent(event) && !result) {
- result = true;
+ while (eventMan->pollEvent(event)) {
+ bool abortFlag = true;
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
@@ -1647,7 +1646,7 @@
case Common::EVENT_MOUSEMOVE:
currentMouseX = event.mouse.x;
currentMouseY = event.mouse.y;
- result = false;
+ abortFlag = false;
break;
case Common::EVENT_QUIT:
case Common::EVENT_RTL:
@@ -1686,9 +1685,12 @@
default:
break;
}
+
+ if (abortFlag)
+ return true;
}
- return result;
+ return false;
}
void getMouseStatus(int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton, int16 *pMouseY) {
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