diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 8b8c74bd0..ad0fade22 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -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; } diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index 1773f59dd..0ddc19a64 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -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; } diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index ff6420958..46468d495 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -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; }