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

Fixes #8004.
This commit is contained in:
Ryan C. Gordon 2023-11-23 18:22:34 -05:00
parent d8102bf660
commit 0a6b5abf45
No known key found for this signature in database
GPG key ID: FA148B892AB48044
3 changed files with 6 additions and 6 deletions

View file

@ -1664,7 +1664,7 @@ static int GL_SetVSync(SDL_Renderer *renderer, const int vsync)
if (retval != 0) {
return retval;
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
} else {
renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
@ -1809,7 +1809,7 @@ static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, Uint32 flags)
} else {
SDL_GL_SetSwapInterval(0);
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}

View file

@ -1046,7 +1046,7 @@ static int GLES_SetVSync(SDL_Renderer *renderer, const int vsync)
if (retval != 0) {
return retval;
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
} else {
renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
@ -1141,7 +1141,7 @@ static SDL_Renderer *GLES_CreateRenderer(SDL_Window *window, Uint32 flags)
} else {
SDL_GL_SetSwapInterval(0);
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}

View file

@ -1963,7 +1963,7 @@ static int GLES2_SetVSync(SDL_Renderer *renderer, const int vsync)
if (retval != 0) {
return retval;
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
} else {
renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
@ -2124,7 +2124,7 @@ static SDL_Renderer *GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
} else {
SDL_GL_SetSwapInterval(0);
}
if (SDL_GL_GetSwapInterval() > 0) {
if (SDL_GL_GetSwapInterval() != 0) {
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
}