SDL_SetEventEnabled(3)

πŸ’… SDL_SetEventEnabled β€” the SDL3 FUNCTIONS glow-up ✨

ok so bestie, welcome to the SDL_SetEventEnabled(3) page, and yes it's giving very much "short and iconic." This is one of those little functions that does exactly one thing and does it flawlessly, no notes. πŸŽ€


🌸 NAME 🌸

SDL_SetEventEnabled β€” Set the state of processing events by type. That's it, that's the whole vibe: you're telling SDL whether it should be handling a certain kind of event or not. Toggle city. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_events.h>

void SDL_SetEventEnabled(Uint32 type, bool enabled);

Look at her. Two params, no return value, zero drama. She just does the thing and leaves. πŸ‘‘


🫢 FUNCTION PARAMETERS 🫢

  • type β€” the type of event; see SDL_EventType for details. (Go peek at SDL_EventType if you wanna know all your options, bestie, the list is long and honestly kind of fascinating.)
  • enabled β€” whether to process the event or not. Like, true = yes babes we're handling it, false = not today. 🚫

🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. fr fr, no cap β€” every thread can call it, nobody's gonna fight over it. Go wild. 🌈


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. So if you're on anything older, it's simply not there and no amount of manifesting will change that. πŸ’€


πŸ’– SEE ALSO πŸ’–

  • SDL_EventEnabled(3) β€” the matching "wait, is this one on?" check. They're a duo, a package deal, the main characters of event-toggling. πŸ”₯

ok that's the whole page, short queen energy, we love her for it. πŸ₯° This was the SDL_SetEventEnabled(3) page from Simple Directmedia Layer, SDL 3.4.18 β€” mwah, bye bestie, go toggle some events πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from