mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 18:58:27 +00:00
Added SDL_SetWindowSurfaceVSync() and SDL_GetWindowSurfaceVSync()
Fixes https://github.com/libsdl-org/SDL/issues/9347
This commit is contained in:
parent
7c75801571
commit
dfe4445214
9 changed files with 106 additions and 21 deletions
|
@ -4727,10 +4727,13 @@ int SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)
|
|||
|
||||
renderer->wanted_vsync = vsync ? SDL_TRUE : SDL_FALSE;
|
||||
|
||||
/* for the software renderer, forward eventually the call to the WindowTexture renderer */
|
||||
/* for the software renderer, forward the call to the WindowTexture renderer */
|
||||
#if SDL_VIDEO_RENDER_SW
|
||||
if (renderer->software) {
|
||||
if (SDL_SetWindowTextureVSync(renderer->window, vsync) == 0) {
|
||||
if (!renderer->window) {
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
if (SDL_SetWindowTextureVSync(NULL, renderer->window, vsync) == 0) {
|
||||
renderer->simulate_vsync = SDL_FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue