diff options
| author | KonAki <konaki@anokonaki.org> | 2026-10-10 23:29:00 +0800 |
|---|---|---|
| committer | KonAki <konaki@anokonaki.org> | 2026-10-10 23:29:00 +0800 |
| commit | 438ad3a0bfe98dd3981f531f3d7bb45132166174 (patch) | |
| tree | 502b604a68e2d05efbef5ccdb3155c4acb58adf9 /kon/kondebug.h | |
| parent | 6938842f479c6af0aaa6999f4dccf0da06a3f610 (diff) | |
program: time each part of the frame, cap fps instead of fixed sleep
Diffstat (limited to 'kon/kondebug.h')
| -rw-r--r-- | kon/kondebug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kon/kondebug.h b/kon/kondebug.h index f17f0c2..0f32a0f 100644 --- a/kon/kondebug.h +++ b/kon/kondebug.h @@ -69,6 +69,9 @@ int kon_debugConsoleOpen(const kon_debug_t *debug); void kon_debugFrame(kon_debug_t *debug); void kon_debugDraw(kon_debug_t *debug, kon_framebuffer_t *fb); +/* where the frame went, in seconds. shown under the fps when the overlay is on */ +void kon_debugTimes(kon_debug_t *debug, double update, double draw, double present, double blit); + float kon_debugFps(const kon_debug_t *debug); /* set by the quit and exit commands, the game decides what to do with it */ @@ -87,6 +90,7 @@ static inline int kon_debugFeedEvent(kon_debug_t *debug, const kon_event_t *even static inline int kon_debugConsoleOpen(const kon_debug_t *debug) { (void)debug; return 0; } static inline void kon_debugFrame(kon_debug_t *debug) { (void)debug; } static inline void kon_debugDraw(kon_debug_t *debug, kon_framebuffer_t *fb) { (void)debug; (void)fb; } +static inline void kon_debugTimes(kon_debug_t *debug, double update, double draw, double present, double blit) { (void)debug; (void)update; (void)draw; (void)present; (void)blit; } static inline float kon_debugFps(const kon_debug_t *debug) { (void)debug; return 0.0f; } static inline int kon_debugQuitRequested(const kon_debug_t *debug) { (void)debug; return 0; } |
