SDL_RegisterEvents(3)

πŸ’– SDL_RegisterEvents(3) πŸ’–

okay so bestie, you're in the SDL3 FUNCTIONS manual, and today's main character is SDL_RegisterEvents.

SDL_RegisterEvents β€” allocate a set of user-defined events, and return the beginning event number for that set of events. periodt. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_events.h>

Uint32 SDL_RegisterEvents(int numevents);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • numevents β€” the number of events to be allocated. yes bestie, literally how many events you're asking for.

🌸 RETURN VALUE 🌸

Returns the beginning event number, or 0 if numevents is invalid or if there are not enough user-defined events left.

so if you get 0, that's the signal that something was not giving what it needed to give. 😭


πŸ¦‹ THREAD SAFETY πŸ¦‹

It is safe to call this function from any thread. any thread, no cap. πŸ”₯


πŸ’… AVAILABILITY πŸ’…

This function is available since SDL 3.2.0. iconic behavior, honestly. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘


This has been your girl signing off from the Simple Directmedia Layer zone, SDL 3.4.18 edition, with the footer's SDL_RegisterEvents(3) date/title slot giving main character energy. Mwah πŸ’‹

πŸ“¦ where this page comes from