[osx] quickfix for frame pacing on osx, keep swap interval to 1 for all surfaces

This commit is contained in:
Martin Fouilleul 2023-09-08 10:32:59 +02:00
parent 3effde949e
commit 907f33bc27
1 changed files with 3 additions and 0 deletions

View File

@ -207,7 +207,10 @@ i32 orca_surface_callback(void* user)
{ {
orca_surface_create_data* data = (orca_surface_create_data*)user; orca_surface_create_data* data = (orca_surface_create_data*)user;
data->surface = oc_surface_create_for_window(data->window, data->api); data->surface = oc_surface_create_for_window(data->window, data->api);
#if OC_PLATFORM_WINDOWS
oc_surface_swap_interval(data->surface, 0); oc_surface_swap_interval(data->surface, 0);
#endif
//NOTE: this will be called on main thread, so we need to deselect the surface here, //NOTE: this will be called on main thread, so we need to deselect the surface here,
// and reselect it on the orca thread // and reselect it on the orca thread