From 907f33bc27f82026938fef8a2dc146a6308ac57e Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Fri, 8 Sep 2023 10:32:59 +0200 Subject: [PATCH] [osx] quickfix for frame pacing on osx, keep swap interval to 1 for all surfaces --- src/runtime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime.c b/src/runtime.c index 2253e82..14ca3a9 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -207,7 +207,10 @@ i32 orca_surface_callback(void* user) { orca_surface_create_data* data = (orca_surface_create_data*)user; data->surface = oc_surface_create_for_window(data->window, data->api); + +#if OC_PLATFORM_WINDOWS oc_surface_swap_interval(data->surface, 0); +#endif //NOTE: this will be called on main thread, so we need to deselect the surface here, // and reselect it on the orca thread