Reduced CPU usage of the MADE engine by about 10% (by profiling the code)
- Added delays in places where the screen gets updated - Moved event polling inside sfPollEvent() (cause that's where events are polled), instead of after each opcode svn-id: r39392
This commit is contained in:
parent
092f2a37e3
commit
498a355a74
3 changed files with 6 additions and 15 deletions
|
@ -203,11 +203,12 @@ int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) {
|
|||
}
|
||||
|
||||
int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) {
|
||||
|
||||
_vm->_system->updateScreen();
|
||||
_vm->handleEvents();
|
||||
_vm->_screen->updateScreenAndWait(10);
|
||||
|
||||
int16 eventNum = _vm->_eventNum;
|
||||
_vm->_eventNum = 0;
|
||||
|
||||
return eventNum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue