Skip to content

Commit

Permalink
metal: fix the SDL_RENDERER_PRESENTVSYNC flag not being set on the re…
Browse files Browse the repository at this point in the history
…nderer info on macOS, when vsync is used.
  • Loading branch information
slime73 committed Nov 4, 2018
1 parent c2bba9e commit c9fed27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/metal/SDL_render_metal.m
Expand Up @@ -1465,6 +1465,9 @@ - (void)dealloc
#if defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)
if (@available(macOS 10.13, *)) {
data.mtllayer.displaySyncEnabled = (flags & SDL_RENDERER_PRESENTVSYNC) != 0;
if (data.mtllayer.displaySyncEnabled) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}
} else
#endif
{
Expand Down

0 comments on commit c9fed27

Please sign in to comment.