added some (currently deactivated) frame rate debugging code
authorHolger Schemel <info@artsoft.org>
Tue, 9 Jun 2015 20:35:52 +0000 (22:35 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 9 Jun 2015 20:35:52 +0000 (22:35 +0200)
src/game.c
src/libgame/sdl.c

index c02e590f5fb026eb3d4c59cf09a03725a804b265..1f9289e8f7c8241df44992ecceb5fafee49f984f 100644 (file)
@@ -11057,9 +11057,18 @@ void GameActions()
   if (tape.playing && tape.warp_forward && !tape.pausing)
     game_frame_delay_value = 0;
 
+#if 0
+  /* ---------- main game synchronization point ---------- */
+
+  int skip = WaitUntilDelayReached(&game_frame_delay, game_frame_delay_value);
+
+  printf("::: skip == %d\n", skip);
+
+#else
   /* ---------- main game synchronization point ---------- */
 
   WaitUntilDelayReached(&game_frame_delay, game_frame_delay_value);
+#endif
 
   if (network_playing && !network_player_action_received)
   {
index 32635b5341a6f4ff7bfb6530742ae22482628e1b..a9fff4eaccc04c495129a84054c91cae7765e7ea 100644 (file)
@@ -60,6 +60,23 @@ static void UpdateScreen(SDL_Rect *rect)
 
   LimitScreenUpdates(FALSE);
 
+#if 0
+  {
+    static int LastFrameCounter = 0;
+    boolean changed = (FrameCounter != LastFrameCounter);
+
+    printf("::: FrameCounter == %d [%s]\n", FrameCounter,
+          (changed ? "-" : "SAME FRAME UPDATED"));
+
+    LastFrameCounter = FrameCounter;
+
+    /*
+    if (FrameCounter % 2)
+      return;
+    */
+  }
+#endif
+
 #if defined(TARGET_SDL2)
 #if USE_RENDERER
   SDL_Surface *screen = backbuffer->surface;