diff options
author | Paul Gilbert | 2009-07-31 23:27:19 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-07-31 23:27:19 +0000 |
commit | ef8597d806611060162459d1b3b865cb24df2fcf (patch) | |
tree | 620202720c9f9a30359b872d61914d61cf7c1e9e | |
parent | c51298957864acb8bbc5016ac5131afd2bb9292f (diff) | |
download | scummvm-rg350-ef8597d806611060162459d1b3b865cb24df2fcf.tar.gz scummvm-rg350-ef8597d806611060162459d1b3b865cb24df2fcf.tar.bz2 scummvm-rg350-ef8597d806611060162459d1b3b865cb24df2fcf.zip |
Fix bug with the event loop that was discarding pending events rather than leaving them to be processed in the following frame
svn-id: r42965
-rw-r--r-- | engines/cruise/cruise_main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index 19495ff931..94dfc95cb5 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1625,11 +1625,10 @@ bool bFastMode = false; 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 @@ bool manageEvents() { 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 @@ bool manageEvents() { default: break; } + + if (abortFlag) + return true; } - return result; + return false; } void getMouseStatus(int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton, int16 *pMouseY) { |