SDL_SetPointerProperty(3)

πŸ’– SDL_SetPointerProperty πŸ’–

okay bestie, welcome to SDL3 FUNCTIONS β€” today's episode is all about SDL_SetPointerProperty, and honestly? she's a lil legend. ✨


🌸 NAME 🌸

SDL_SetPointerProperty β€” sets a pointer property inside a group of properties. that's it, that's the whole job, and she does it flawlessly. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_properties.h>

bool SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • props β€” the properties you wanna modify. the lil group of properties. your canvas. 🎨
  • name β€” the name of the property you're modifying. yep, just the name. identify yourself queen. πŸ‘‘
  • value β€” the new value of the property, or NULL to delete the property. so like, passing NULL here is you saying "and scene, we're done here." πŸ’€

✨ RETURN VALUE ✨

returns true on success or false on failure. and if it fails? call SDL_GetError() for more info, because she WILL tell you what went wrong, no cap. 😭


🧚 THREAD SAFETY 🧚

it is safe to call this function from any thread. literally any of them. go wild. 🫢


πŸ’œ AVAILABILITY πŸ’œ

this function is available since SDL 3.2.0. so if you're on something older... bestie. upgrade. πŸ™ˆ


🌈 SEE ALSO 🌈

the whole friend group, fr fr:


lowkey reminder: value being NULL doesn't set a null pointer property, it deletes the property. that's not a vibe, that's a whole different operation. don't get it twisted. πŸ’–

and that's the page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18. go forth and set those pointer properties, bestie, you're gonna slay. πŸ“πŸ’…πŸŽ€

πŸ“¦ where this page comes from