mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 07:28:30 +00:00
render: GL-based renderers should treat adaptive vsync as vsync being enabled.
Fixes #8004.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user