Backport simplify flags PR #7220

This commit is contained in:
Sylvain 2023-02-04 15:51:37 +01:00 committed by Sam Lantinga
parent f71178a16f
commit 17515f4aef
40 changed files with 176 additions and 175 deletions

View file

@ -1015,10 +1015,10 @@ SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
}
}
if ((flags & SDL_RENDERER_PRESENTVSYNC) != 0) {
if (flags & SDL_RENDERER_PRESENTVSYNC) {
renderer->wanted_vsync = SDL_TRUE;
if ((renderer->info.flags & SDL_RENDERER_PRESENTVSYNC) == 0) {
if (!(renderer->info.flags & SDL_RENDERER_PRESENTVSYNC)) {
renderer->simulate_vsync = SDL_TRUE;
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}