SDL3 uses it internally, so it’s stable. I’ve used it to store Tiled tilemap properties using LuaJIT so it should work fine. Just be sure to clean up any pointers you allocate.
The official SDL properties are prefixed with SDL, for example SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN is defined as "SDL.window.create.fullscreen", so it should be safe as long as your custom property names don’t start with SDL.
That said, I’m curious what advantage this has over a global variable…
I tried to show all properties before adding my own stuff because I don’t want to overwrite stuff from SDL but I was unable to do that. That’s why I added a pattern before the entry to the key.
I was questioning the same thing and just dive a bit deeper. If you check SDL_CreateProperties function, it groups each property group in an hash table, which I think has a very good implementation. You’d probably end up with a similar pattern for holding global variables for a complex app scenario
The thing is I haven’t had so much time to get into the source code of SDL3 and I have to admit I wouldn’t like to do that in this moment (maybe after I’ve finished with my projects). Right now I’m doing my job with the help of the documentation (and the wiki, examples, …) and with the binary packages installed with the package manager of the Operating System I’m using so, now, I don’t want to spend time looking for code into the source tree of SDL3.
Really thank you so much for your time and answer (all of you).