pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2834 - in branches/pingus_sdl/src: . gui


From: jsalmon3
Subject: [Pingus-CVS] r2834 - in branches/pingus_sdl/src: . gui
Date: Sat, 11 Aug 2007 04:37:22 +0200

Author: jsalmon3
Date: 2007-08-11 04:37:16 +0200 (Sat, 11 Aug 2007)
New Revision: 2834

Modified:
   branches/pingus_sdl/src/game_session.cpp
   branches/pingus_sdl/src/gui/screen_manager.cpp
Log:
Only sleep if the game is running too fast.
Reduced the delay time in ScreenManager.



Modified: branches/pingus_sdl/src/game_session.cpp
===================================================================
--- branches/pingus_sdl/src/game_session.cpp    2007-08-11 01:59:03 UTC (rev 
2833)
+++ branches/pingus_sdl/src/game_session.cpp    2007-08-11 02:37:16 UTC (rev 
2834)
@@ -157,7 +157,7 @@
     left_over_time = time_passed - (i * update_time);
   }
 
-  if (left_over_time < 0)
+  if (left_over_time < 0 && time_passed < update_time)
     {
       // FIXME: This doesn't really belong here
       SDL_Delay(-left_over_time);

Modified: branches/pingus_sdl/src/gui/screen_manager.cpp
===================================================================
--- branches/pingus_sdl/src/gui/screen_manager.cpp      2007-08-11 01:59:03 UTC 
(rev 2833)
+++ branches/pingus_sdl/src/gui/screen_manager.cpp      2007-08-11 02:37:16 UTC 
(rev 2834)
@@ -139,7 +139,7 @@
        }
 
       // Stupid hack to make this thing take less CPU
-      SDL_Delay(10);
+      SDL_Delay(1);
     }
 
   Display::remove_flip_screen_hook(cursor);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]