diff options
author | Vincent Hamm | 2007-12-25 21:03:20 +0000 |
---|---|---|
committer | Vincent Hamm | 2007-12-25 21:03:20 +0000 |
commit | 1b62e2758c198f92956815fc66b979f4673c3cbe (patch) | |
tree | fd24c4295e4b52751aed04993af261fc7ee1c173 /engines/cruise/cruise_main.cpp | |
parent | b2ab69f455978a4dffc4fcb8cd6148edbb886327 (diff) | |
download | scummvm-rg350-1b62e2758c198f92956815fc66b979f4673c3cbe.tar.gz scummvm-rg350-1b62e2758c198f92956815fc66b979f4673c3cbe.tar.bz2 scummvm-rg350-1b62e2758c198f92956815fc66b979f4673c3cbe.zip |
Fix input
Fix timming
svn-id: r29990
Diffstat (limited to 'engines/cruise/cruise_main.cpp')
-rw-r--r-- | engines/cruise/cruise_main.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index 4f7f11fd2e..457ac5a9e1 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1593,12 +1593,6 @@ int currentMouseX = 0; int currentMouseY = 0; int currentMouseButton = 0; -void getMouseStatus(int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton, int16 *pMouseY) { - *pMouseX = currentMouseX; - *pMouseY = currentMouseY; - *pMouseButton = currentMouseButton; -} - bool bFastMode = false; void manageEvents() { @@ -1730,11 +1724,13 @@ void manageEvents() { * mouseRight = 0; * } */ - g_system->updateScreen(); +} - if (!bFastMode) { - g_system->delayMillis(40); - } +void getMouseStatus(int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton, int16 *pMouseY) { + manageEvents(); + *pMouseX = currentMouseX; + *pMouseY = currentMouseY; + *pMouseButton = currentMouseButton; } void mainLoop(void) { @@ -1849,8 +1845,15 @@ void mainLoop(void) { } if (userWait) { - int16 button = 0; - while (!button) { + int16 mouseX; + int16 mouseY; + int16 mouseButton; + + do { + getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY); + }while(mouseButton); + + while (!mouseButton) { manageScripts(&relHead); manageScripts(&procHead); @@ -1865,7 +1868,9 @@ void mainLoop(void) { int16 mouseVar; int16 mouseX; int16 mouseY; - getMouseStatus(&mouseVar, &mouseX, &button, &mouseY); + getMouseStatus(&mouseVar, &mouseX, &mouseButton, &mouseY); + + flip(); } changeScriptParamInList(-1, -1, &procHead, 9999, 0); |