Add SDL_GetRenderVSync (see #6495) (#6965)

This commit is contained in:
Sylvain Becker 2023-01-02 20:21:02 +01:00 committed by GitHub
parent 023f067903
commit 851b0e16be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 0 deletions

View file

@ -4492,3 +4492,13 @@ int SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)
}
return 0;
}
int SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync)
{
CHECK_RENDERER_MAGIC(renderer, -1);
if (vsync == NULL) {
return SDL_InvalidParamError("vsync");
}
*vsync = renderer->wanted_vsync;
return 0;
}