Skip to content

Commit

Permalink
Don't force vsync on for the software renderer
Browse files Browse the repository at this point in the history
Setting vsync 0 should succeed for the software renderer.
  • Loading branch information
slouken committed Jul 13, 2024
1 parent 1e6119e commit 9379e2e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/render/SDL_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -4770,7 +4770,11 @@ int SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)
#if SDL_VIDEO_RENDER_SW
if (renderer->software) {
if (!renderer->window) {
return SDL_Unsupported();
if (!vsync) {
return 0;
} else {
return SDL_Unsupported();
}
}
if (SDL_SetWindowTextureVSync(NULL, renderer->window, vsync) == 0) {
renderer->simulate_vsync = SDL_FALSE;
Expand Down

0 comments on commit 9379e2e

Please sign in to comment.