SDL_CreateProperties(3)
β¨ SDL_CreateProperties(3) β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is literally a function that hands you a whole lil bag of properties π
π NAME π
SDL_CreateProperties β create a group of properties.
like. a little squad. a friend group. for your properties. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_properties.h>
SDL_PropertiesID SDL_CreateProperties(void);
no arguments, no drama, she just takes zero things and gives you a whole group π«Ά
πΈ DESCRIPTION πΈ
So here's the tea: all properties are automatically destroyed when SDL_Quit() is called. π₯
Which is lowkey the best part?? Like you don't even have to remember to clean up, the cleanup is just... handled. iconic behaviour honestly. SDL_Quit() comes through and sweeps everything away, periodt.
π RETURN VALUE π
She returns an ID for a new group of properties β¨ β or 0 on failure π.
And if you get that 0? Do not panic, bestie. Just call SDL_GetError() for more information, she will tell you exactly what went wrong π
π THREAD SAFETY π
It is safe to call this function from any thread. π
No cap. Every thread. Go off, multitask, she's not gonna be weird about it π
β AVAILABILITY β
This function is available since SDL 3.2.0. π¦
(so if you're on something older, that's giving ancient, and she's simply not there yet π)
π SEE ALSO π
SDL_DestroyProperties(3)β the other half of the duo, go say hi π
not me writing a whole love letter to a property container. anyway. she's useful, she's thread-safe, and she cleans up after herself. vibe check: passed π β¨
Simple Directmedia Layer Β· SDL 3.4.18 Β· and yes, this was SDL_CreateProperties(3) the whole time π
mwah, go make some properties, ily, bye π«ΆππΈ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms