aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJoost Peters2006-05-29 23:25:50 +0000
committerJoost Peters2006-05-29 23:25:50 +0000
commit4e45be4568eee8f378c13eb74ee47fee731cc012 (patch)
treeef3a15e55ac4287703557a7110741c7a1a0eb18c /engines
parent163ed1afd3fc29f351125fcf8f98fc4ad2a006b9 (diff)
downloadscummvm-rg350-4e45be4568eee8f378c13eb74ee47fee731cc012.tar.gz
scummvm-rg350-4e45be4568eee8f378c13eb74ee47fee731cc012.tar.bz2
scummvm-rg350-4e45be4568eee8f378c13eb74ee47fee731cc012.zip
Only call OSystem::updateScreen() every other frame, so no more than 50 times per second.
This doesn't appear to make a visible difference on PC, but allows the game to run on PSP and probably several other consoles/ports that wait for 50/60hz vsync. Since I'm not familiar with this engine I've added a 'FIXME' comment, because maybe this can be fixed/improved in a different manner. svn-id: r22758
Diffstat (limited to 'engines')
-rw-r--r--engines/cine/main_loop.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index d0fbc5106f..99807b5002 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -127,7 +127,13 @@ void manageEvents(int count) {
int i;
for (i = 0; i < count; i++) {
- g_system->updateScreen();
+ //FIXME(?): Maybe there's a better way to "fix" this?
+ //
+ //Since not all backends/ports can update the screen
+ //100 times per second, only update the screen every
+ //other frame (1000 / 2 * 10 i.e. 50 times per second max.)
+ if (i % 2)
+ g_system->updateScreen();
g_system->delayMillis(10);
manageEvents(0);
}