mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-12 05:41:10 +01:00
metal: fix the SDL_RENDERER_PRESENTVSYNC flag not being set on the renderer info on macOS, when vsync is used.
This commit is contained in:
parent
c2bba9e448
commit
c9fed27289
@ -1465,6 +1465,9 @@ METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||||||
#if defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)
|
#if defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)
|
||||||
if (@available(macOS 10.13, *)) {
|
if (@available(macOS 10.13, *)) {
|
||||||
data.mtllayer.displaySyncEnabled = (flags & SDL_RENDERER_PRESENTVSYNC) != 0;
|
data.mtllayer.displaySyncEnabled = (flags & SDL_RENDERER_PRESENTVSYNC) != 0;
|
||||||
|
if (data.mtllayer.displaySyncEnabled) {
|
||||||
|
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user