Added a note about where to set global platform properties

This commit is contained in:
Sam Lantinga
2026-06-16 16:50:06 -07:00
parent 514b26e4c4
commit 54e672ec0d

View File

@@ -144,6 +144,9 @@ SDL_PropertiesID SDL_GetGlobalProperties(void)
SDL_PropertiesID props = SDL_GetAtomicU32(&SDL_global_properties);
if (!props) {
props = SDL_CreateProperties();
// Set global platform properties
if (!SDL_CompareAndSwapAtomicU32(&SDL_global_properties, 0, props)) {
// Somebody else created global properties before us, just use those
SDL_DestroyProperties(props);