diff options
author | Vincent Hamm | 2002-03-24 00:44:28 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-03-24 00:44:28 +0000 |
commit | 2a97cf0dde41758e9075a867b148fab65629871a (patch) | |
tree | 960925af3348336daad9add336fefb1861cdb610 | |
parent | f5741df25cb58b1ae73db5cb00fdb1b2d601abbf (diff) | |
download | scummvm-rg350-2a97cf0dde41758e9075a867b148fab65629871a.tar.gz scummvm-rg350-2a97cf0dde41758e9075a867b148fab65629871a.tar.bz2 scummvm-rg350-2a97cf0dde41758e9075a867b148fab65629871a.zip |
Fixed gui loop
svn-id: r3807
-rw-r--r-- | scummvm.cpp | 2 | ||||
-rw-r--r-- | sdl.cpp | 24 |
2 files changed, 16 insertions, 10 deletions
diff --git a/scummvm.cpp b/scummvm.cpp index e91a21aa63..3ea30e31f0 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -1072,7 +1072,7 @@ void Scumm::launch() setupSound(); - runScript(1,0,0,&_bootParam); +// runScript(1,0,0,&_bootParam); // _scummTimer = 0; @@ -952,12 +952,15 @@ int main(int argc, char* argv[]) { scumm->_system = &_system; scumm->launch(); + + _system.last_time = SDL_GetTicks(); + + scumm->runScript(1,0,0,&scumm->_bootParam); // scumm->scummMain(argc, argv); // Todo: need to change that as well gui.init(scumm); /* Reinit GUI after loading a game */ - _system.last_time = SDL_GetTicks(); scumm->mainRun(); @@ -1983,14 +1986,17 @@ void Scale_2xSaI (uint8 *srcPtr, uint32 srcPitch, uint8 * /* deltaPtr */, int OSystem::waitTick(int delta) { - updateScreen(scumm); - new_time = SDL_GetTicks(); - waitForTimer(scumm, delta * 15 + last_time - new_time); - last_time = SDL_GetTicks(); - if (gui._active) { - gui.loop(); - delta = 5; - } + do + { + updateScreen(scumm); + new_time = SDL_GetTicks(); + waitForTimer(scumm, delta * 15 + last_time - new_time); + last_time = SDL_GetTicks(); + if (gui._active) { + gui.loop(); + delta = 5; + } + }while(gui._active); return(delta); } |