Add runtime option to render expired frames
Replace the compilation flag SKIP_FRAMES by a runtime flag to force rendering of expired frames. By default, the expired frames are skipped.
This commit is contained in:
@@ -4,15 +4,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
struct fps_counter {
|
||||
bool started;
|
||||
uint32_t slice_start; // initialized by SDL_GetTicks()
|
||||
int nr_rendered;
|
||||
#ifdef SKIP_FRAMES
|
||||
int nr_skipped;
|
||||
#endif
|
||||
};
|
||||
|
||||
void
|
||||
@@ -27,9 +23,7 @@ fps_counter_stop(struct fps_counter *counter);
|
||||
void
|
||||
fps_counter_add_rendered_frame(struct fps_counter *counter);
|
||||
|
||||
#ifdef SKIP_FRAMES
|
||||
void
|
||||
fps_counter_add_skipped_frame(struct fps_counter *counter);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user