Backends: SDL3: Comments (#6146)

This commit is contained in:
ocornut
2025-05-12 19:19:30 +02:00
parent b9ac32a0d5
commit 4a6ba95392
+1 -1
View File
@@ -782,7 +782,7 @@ void ImGui_ImplSDL3_NewFrame()
if (w > 0 && h > 0) if (w > 0 && h > 0)
io.DisplayFramebufferScale = ImVec2((float)display_w / w, (float)display_h / h); io.DisplayFramebufferScale = ImVec2((float)display_w / w, (float)display_h / h);
// Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution) // Setup time step (we could also use SDL_GetTicksNS() available since SDL3)
// (Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. Happens in VMs and Emscripten, see #6189, #6114, #3644) // (Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. Happens in VMs and Emscripten, see #6189, #6114, #3644)
static Uint64 frequency = SDL_GetPerformanceFrequency(); static Uint64 frequency = SDL_GetPerformanceFrequency();
Uint64 current_time = SDL_GetPerformanceCounter(); Uint64 current_time = SDL_GetPerformanceCounter();