From 54e672ec0d2d5c00e36a8fee5e0ce73e73635505 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 16 Jun 2026 16:50:06 -0700 Subject: [PATCH] Added a note about where to set global platform properties --- src/SDL_properties.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SDL_properties.c b/src/SDL_properties.c index 6dd38ca83c..762af38b9b 100644 --- a/src/SDL_properties.c +++ b/src/SDL_properties.c @@ -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);