From 6be75f54525e589347d4a0d00c890806d8a65f06 Mon Sep 17 00:00:00 2001 From: funman300 Date: Thu, 20 Aug 2026 19:35:17 +0000 Subject: [PATCH] fix(launcher): steady 60fps cadence to stop VRR/G-Sync flicker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The idle repaint was 500ms (~2fps), below the G-Sync/FreeSync VRR floor, so the panel ran low-framerate compensation and every hover/animation spiked then dropped the rate — the swinging refresh rate makes VRR displays flicker. Present at a constant ~60fps (16ms) instead so VRR locks to one rate. Cheap for a UI this small; vsync keeps present times regular. --- src/app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 0684306..0f2a525 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1804,7 +1804,15 @@ impl LauncherApp { impl eframe::App for LauncherApp { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - ctx.request_repaint_after(std::time::Duration::from_millis(500)); + // Present at a steady ~60 FPS while the window is open. egui is normally + // reactive and would idle at ~2 FPS (a 500 ms repaint), but on a G-Sync / + // FreeSync (VRR) display that sits below the VRR floor: the panel engages + // low-framerate compensation, and every hover/animation briefly spikes the + // rate and drops back, so the refresh rate keeps swinging and the panel + // visibly flickers. A constant, in-range cadence gives VRR a single rate to + // lock onto and removes the flicker. 16 ms is monitor-independent and cheap + // for a UI this small; vsync (on by default) keeps present times regular. + ctx.request_repaint_after(std::time::Duration::from_millis(16)); self.drive_restart_queue(); egui::TopBottomPanel::top("header")