summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-09-11 20:20:23 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-09-11 20:20:23 +0000
commitabeaf0ce93dba357abf8130d62ae10a9f1a35452 (patch)
tree553de0d1477ba209c53802ca3e92ad133b1248af /src
parent89be648c4f5292dc22eb774afda599d48626f1d8 (diff)
downloadmana-abeaf0ce93dba357abf8130d62ae10a9f1a35452.tar.gz
mana-abeaf0ce93dba357abf8130d62ae10a9f1a35452.tar.bz2
mana-abeaf0ce93dba357abf8130d62ae10a9f1a35452.tar.xz
mana-abeaf0ce93dba357abf8130d62ae10a9f1a35452.zip
Fixed more fps issues
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index dbdfe481..3008e9cf 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -374,7 +374,9 @@ void Game::logic()
}
else
{
- while (abs(tick_time * 10 - drawTime) >= delta) {
+ if (abs(tick_time * 10 - drawTime) <= delta) {
+ SDL_Delay(10);
+ } else {
frame++;
engine->draw(graphics);
graphics->updateScreen();
@@ -385,6 +387,7 @@ void Game::logic()
else
{
SDL_Delay(10);
+ drawTime = tick_time * 10;
}
// Handle network stuff