added video frame counter (currently not used)
authorHolger Schemel <info@artsoft.org>
Fri, 24 May 2019 18:16:22 +0000 (20:16 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 24 May 2019 18:16:22 +0000 (20:16 +0200)
src/libgame/sdl.c
src/libgame/system.c
src/libgame/system.h

index f18b97b47afee8a1db1fc0e380b7b178a2f4397f..e13b6736e32999aec9e2574c7d3da7780dffe59c 100644 (file)
@@ -218,6 +218,8 @@ static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay)
   if (with_frame_delay)
     WaitUntilDelayReached(&video.frame_delay, video.frame_delay_value);
 
+  video.frame_counter++;
+
   // show render target buffer on screen
   SDL_RenderPresent(sdl_renderer);
 }
index d6ede9ffd169ed8808177c144864940f957fe260..dc7dba8b2db2c763e19ee8cc274c38d73cc50b06 100644 (file)
@@ -570,6 +570,7 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen)
 
   video.window_scaling_available = WINDOW_SCALING_STATUS;
 
+  video.frame_counter = 0;
   video.frame_delay = 0;
   video.frame_delay_value = GAME_FRAME_DELAY;
 
index 6c0490f327e00c3ab1fd821cec9a46ec0ed20388..4c0081e5de7cf60f1faa54bd9f3f25cf494eff69 100644 (file)
@@ -1011,6 +1011,7 @@ struct VideoSystemInfo
   int screen_rendering_mode;
   int vsync_mode;
 
+  unsigned int frame_counter;
   unsigned int frame_delay;
   unsigned int frame_delay_value;