Don't force vsync on for the software renderer

Setting vsync 0 should succeed for the software renderer.
This commit is contained in:
Sam Lantinga 2024-07-13 10:04:15 -07:00
parent 1e6119e335
commit 9379e2eb8d

View File

@ -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;