SCI: Limit the screen refresh rate to 60fps
svn-id: r49647
This commit is contained in:
parent
58487da20b
commit
cfdbfaa28e
4 changed files with 11 additions and 3 deletions
|
@ -319,8 +319,14 @@ sciEvent EventManager::get(unsigned int mask) {
|
|||
//sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 };
|
||||
sciEvent event = { 0, 0, 0, 0 };
|
||||
|
||||
// Update the screen here, since it's called very often
|
||||
g_system->updateScreen();
|
||||
// Update the screen here, since it's called very often.
|
||||
// Throttle the screen update rate to 60fps.
|
||||
uint32 curTime = g_system->getMillis();
|
||||
uint32 duration = curTime - g_sci->getEngineState()->_screenUpdateTime;
|
||||
if (duration >= 1000 / 60) {
|
||||
g_system->updateScreen();
|
||||
g_sci->getEngineState()->_screenUpdateTime = g_system->getMillis();
|
||||
}
|
||||
|
||||
// Get all queued events from graphics driver
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue