From 40d6342d46906c0ccd2055695572e8999cc4a5eb Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 9 Aug 2026 15:07:15 +1000 Subject: [PATCH] [client] overlay: initialize ImGui frame timing Initialize the previous ImGui frame timestamp before rendering overlays. Without this, the first DeltaTime equals host uptime. Recent ImGui versions track background and foreground draw-list activity using float time. At long host uptimes its precision can span multiple display frames, preventing those lists from being reset and submitting translucent overlay commands more than once. --- client/src/app.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/app.c b/client/src/app.c index 76236078..be0b7a6d 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -962,6 +962,10 @@ void app_initOverlays(void) } } ll_unlock(g_state.overlays); + + /* Do not seed ImGui's clock with absolute host uptime. ImGui stores the + * background and foreground draw-list activity time as a float. */ + g_state.lastImGuiFrame = nanotime(); } static inline void mergeRect(struct Rect * dest, const struct Rect * a, const struct Rect * b)