mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-15 20:08:17 +00:00
[client] imgui: run animations at consistent speeds
Currently, this is visible through how fast the cursor blinks, with it blinking faster at higher refresh rates. This commit makes the timing consistent.
This commit is contained in:
@@ -811,6 +811,10 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
|
||||
g_state.io->KeyAlt = g_state.modAlt;
|
||||
g_state.io->KeySuper = g_state.modSuper;
|
||||
|
||||
uint64_t now = nanotime();
|
||||
g_state.io->DeltaTime = (now - g_state.lastImGuiFrame) * 1e-9f;
|
||||
g_state.lastImGuiFrame = now;
|
||||
|
||||
igNewFrame();
|
||||
|
||||
if (g_state.overlayInput)
|
||||
|
Reference in New Issue
Block a user