poll_scroll(3alleg4)

πŸ’– poll_scroll β€” the Allegro manual, but make it a group chat πŸ’–

okay bestie so this is a page from the Allegro manual (you know, 3alleg4, the Allegro game programming library situation) and today's main character is a lil function called poll_scroll. she's tiny. she's important. let's get into it 🫢


✨ NAME ✨

poll_scroll β€” checks the status of a scroll request with triple buffering. it's part of the Allegro game programming library, and yes she ate πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

int poll_scroll();

that's it. that's the whole thing. no arguments, no drama, just vibes ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: this function is for triple buffering. what it does is check the status of a hardware scroll that was already kicked off earlier by the request_scroll() routine.

basically you asked for a scroll, and now you're like "hey… did that happen yet??" and poll_scroll() is the friend who tells you. it's giving project manager energy fr fr πŸ‘‘


πŸŽ€ RETURN VALUE πŸŽ€

she returns a number, and the number means things:

  • non-zero β†’ it is still waiting to take place. like, hold on, it's coming, don't rush her 😭
  • zero β†’ the requested scroll has already happened. slay, it's done, periodt πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, iykwim:


and that's the whole page, bestie!! 🌈 this lil legend lives in Allegro version 4.4.3, and yeah the page is literally just called poll_scroll(3alleg4). go forth and poll responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ