mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-12-12 21:23:28 +08:00
Don't force vsync on for the software renderer
Setting vsync 0 should succeed for the software renderer.
This commit is contained in:
parent
1e6119e335
commit
9379e2eb8d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user