From 9aad2c0ec816346cec05fd2c5691609be7fbb612 Mon Sep 17 00:00:00 2001 From: martinfouilleul Date: Sun, 10 Sep 2023 12:28:53 +0200 Subject: [PATCH] Fix debug overlay vsync on windows --- src/runtime.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/runtime.c b/src/runtime.c index 7ee08d3..03fc422 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -883,7 +883,13 @@ int main(int argc, char** argv) app->debugOverlay.maxEntries = 200; oc_arena_init(&app->debugOverlay.logArena); +#if OC_PLATFORM_WINDOWS + //NOTE(martin): on windows we set all surfaces to non-synced, and do a single "manual" wait here. + // on macOS each surface is individually synced to the monitor refresh rate but don't block each other + oc_surface_swap_interval(app->debugOverlay.surface, 0); +#else oc_surface_swap_interval(app->debugOverlay.surface, 1); +#endif oc_surface_deselect();