Question: I have an `SDL_Renderer` which I set to use or not use vSync depending on the user). In my options menu I have an option for enabling/disabling vSync. Can I edit my renderer to update the vSync preferences so that I don't have to destroy and recreate it? Doing so would invalidate a lot of renderer pointers in my game, so I would like to find an alternative solution.

Answer: 
Since 2.0.18 you can use [SDL\_RenderSetVSync](https://wiki.libsdl.org/SDL_RenderSetVSync):

> 
> Toggle VSync of the given renderer.
> 
> 
> **Syntax**  
> 
> `int SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);`
> 
> 
> 

`vsync` can be set 1 for on or 0 for off (other values are reserved).
**EDIT**: The following only works when executed before calling `SDL_CreateRenderer`. Seems like SDL has made a simple and trivial task quite hard.

SDL wiki suggests that calling `SDL_SetHint(SDL_HINT_RENDER_VSYNC, "1" or "0");` should do the trick.
You might also want to try [SDL\_SetHintWithPriority](https://wiki.libsdl.org/SDL_SetHintWithPriority), which will override any possible environment variables that have been set that could prevent that value passed in to `SDL_SetHint` to have an effect.