mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
SDL_RenderSetVSync()
: Restrict vsync
to 0 or 1
In the future, we might want to support special swap intervals. To prevent applications from expecting nonzero values of vsync to be the same as "on", fail with SDL_Unsupported() if the value passed is neither 0 nor 1.
This commit is contained in:
parent
4549769d7d
commit
4a9947336c
2 changed files with 5 additions and 1 deletions
|
@ -1698,7 +1698,7 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * re
|
|||
* Toggle VSync of the given renderer.
|
||||
*
|
||||
* \param renderer The renderer to toggle
|
||||
* \param vsync Non-zero for on, zero for off
|
||||
* \param vsync 1 for on, 0 for off. All other values are reserved
|
||||
* \returns a 0 int on success, or non-zero on failure
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue