al_wait_for_vsync(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

✨ NAME ✨

al_wait_for_vsync β€” Allegro 5 API, bestie πŸ’–. It’s a page from the Library Functions Manual, and the whole thing is al_wait_for_vsync(3).

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

bool al_wait_for_vsync(void)

πŸ’… DESCRIPTION πŸ’…

Okay so this function waits for the beginning of a vertical retrace. That’s the vibe. ✨ Some driver/card/monitor combinations may not be capable of this, and that is genuinely not your fault. πŸ™ˆ

Also, important note: al_flip_display(3) usually already waits for the vertical retrace, so unless you are doing something special, there is no reason to call this function. Like, none. Don’t be extra for no reason. πŸ’€

It returns false if not possible, and true if successful. That’s it. Periodt.

πŸŽ€ SEE ALSO πŸŽ€

  • al_flip_display(3) β€” the one that usually already handles the vertical retrace waiting for you. 🫢

Cute sign-off: source/version is the Allegro reference manual, and the footer didn’t list a date, so I’m not inventing one. Stay slay, bestie. πŸ’–βœ¨

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms