render: GL-based renderers should treat adaptive vsync as vsync being enabled.

Fixes #8004.
main
Ryan C. Gordon 2023-11-23 18:28:43 -05:00
parent 74a2542564
commit dcf04559db
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
2 changed files with 6 additions and 10 deletions

View File

@ -1701,7 +1701,7 @@ static int GL_SetVSync(SDL_Renderer *renderer, const int vsync)
return retval;
}
if (interval > 0) {
if (interval != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
} else {
renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
@ -1850,10 +1850,8 @@ static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, SDL_PropertiesID crea
int interval = 0;
if (SDL_GL_GetSwapInterval(&interval) < 0) {
/* Error */
} else {
if (interval > 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}
} else if (interval != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}
}

View File

@ -1988,7 +1988,7 @@ static int GLES2_SetVSync(SDL_Renderer *renderer, const int vsync)
return retval;
}
if (interval > 0) {
if (interval != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
} else {
renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
@ -2151,10 +2151,8 @@ static SDL_Renderer *GLES2_CreateRenderer(SDL_Window *window, SDL_PropertiesID c
int interval = 0;
if (SDL_GL_GetSwapInterval(&interval) < 0) {
/* Error */
} else {
if (interval > 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}
} else if (interval != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}
}