SDL_GetRenderVSync(3)
π SDL_GetRenderVSync π
okay bestie, welcome to the SDL3 functions manual, and today's main character is SDL_GetRenderVSync β she's the one who tells you what your renderer's VSync situation is rn. no cap. π¦
β¨ NAME β¨
SDL_GetRenderVSync β get the VSync of the given renderer. that's it, that's the whole job. she's a getter, she's nosy, she slays. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_render.h>
bool SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync);
look at her. iconic signature. two args, one bool return. periodt. β¨
β¨ FUNCTION PARAMETERS β¨
rendererβ the renderer to toggle. yes girl, that's literally what the manpage says, we pass the renderer in and she gets poked at. πvsyncβ anintthat gets filled with the current vertical refresh sync interval. so like, this is where the answer lands, bestie. if you wanna know what the number means, go readSDL_SetRenderVSync()β she's the one holding the lore. π
β¨ RETURN VALUE β¨
returns true on success or false on failure. and if it fails?? call SDL_GetError() for more info, because she will NOT be explaining herself otherwise. π
fr fr, always check the return value. don't just assume it worked and then act surprised later. that's not the vibe. π
β¨ THREAD SAFETY β¨
okay this is important so listen up: this function should only be called on the main thread. no side-quests, no background thread shenanigans. main character energy only, literally. π
β¨ AVAILABILITY β¨
this function is available since SDL 3.2.0. so if you're on something older, sorry babe, she's not there yet. π§
β¨ SEE ALSO β¨
SDL_SetRenderVSync(3)β her counterpart, her other half, the one who actually sets the thing. go read her next. π«Ά
and that's the whole page, bestie!! go forth and get your VSync, you've got this. πΈ
mwah π β brought to you by Simple Directmedia Layer, <strong>SDL 3.4.18</strong>, dated SDL_GetRenderVSync(3) (yeah the date slot is just the page name again, iconic honestly). stay synced. πβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms