summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/game.cpp13
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 78b11eff..35d4e820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
Added new market stand.
* src/game.cpp, src/gui/setup_video.cpp, src/main.cpp: Fixed fps
limiter issues and increased default limit to 60.
+ * src/game.cpp: Fixed fps limiter when disabled.
2006-09-05 Philipp Sehmisch <tmw@crushnet.org>
diff --git a/src/game.cpp b/src/game.cpp
index 630e40e5..dbdfe481 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -366,11 +366,20 @@ void Game::logic()
// Update the screen when application is active, delay otherwise
if (SDL_GetAppState() & SDL_APPACTIVE) {
- while (abs(tick_time * 10 - drawTime) >= delta) {
+ if (fpsLimit == 0) {
frame++;
engine->draw(graphics);
graphics->updateScreen();
- drawTime += delta;
+ drawTime = tick_time * 10;
+ }
+ else
+ {
+ while (abs(tick_time * 10 - drawTime) >= delta) {
+ frame++;
+ engine->draw(graphics);
+ graphics->updateScreen();
+ drawTime += delta;
+ }
}
}
else