SDL_ClearProperty(3)

πŸ’– SDL_ClearProperty πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_ClearProperty β€” she's a lil function with one job and she does it flawlessly, no cap ✨


🌸 NAME 🌸

SDL_ClearProperty β€” yeet a property out of a group of properties. that's it. that's the whole gig. she clears it. gone. poof. 🫢


✨ SYNOPSIS ✨

#include <SDL3/SDL_properties.h>

bool SDL_ClearProperty(SDL_PropertiesID props, const char *name);

like. look at her. two arguments, one bool, zero drama πŸ’…


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • props β€” the properties you're modifying, i.e. the group of properties getting the lil makeover. it's an SDL_PropertiesID, so it's the whole squad, not just one entry 🧚
  • name β€” the name of the property you want to clear. yes, that one. the one you're done with. she's getting removed bestie 🌈

⭐ RETURN VALUE ⭐

returns true when it worked and false when it did not β€” and if it's giving failure energy, you gotta call SDL_GetError() for more info. that's your receipts, your detective work, your "wait what happened" hotline 😭


πŸ¦‹ THREAD SAFETY πŸ¦‹

good news queen: it is safe to call this function from any thread. no locking gymnastics required, no "wait am I allowed to be here" panic. call her from wherever you are. iconic behaviour honestly πŸ‘‘


πŸ’œ AVAILABILITY πŸ’œ

this function has been available since SDL 3.2.0. so if you're on anything older, she's simply not there yet and that's the vibe check πŸ’€


lowkey reminder: false means something went wrong and you should be checking SDL_GetError() like the responsible little programmer you are. don't just ignore her. she's trying to tell you something πŸ™ˆ

that's the whole page, bestie β€” nothing else to clear here except maybe your browser tabs 🌸

signing off from the Simple Directmedia Layer manual, SDL 3.4.18 edition, brought to you by the SDL_ClearProperty(3) page itself πŸ’–βœ¨πŸŽ€ bye pookie 🫢

πŸ“¦ where this page comes from