mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-19 04:28:58 +00:00
Added a note about where to set global platform properties
This commit is contained in:
parent
514b26e4c4
commit
54e672ec0d
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue