Updated the atomic API for SDL 3.0 naming conventions

Fixes https://github.com/libsdl-org/SDL/issues/7388
This commit is contained in:
Sam Lantinga 2024-01-18 03:39:55 -08:00
parent 4e60fc9b2b
commit a2665f54c8
24 changed files with 156 additions and 112 deletions

View file

@ -536,14 +536,14 @@ static void SDL_InitDynamicAPI(void)
static SDL_bool already_initialized = SDL_FALSE;
static SDL_SpinLock lock = 0;
SDL_AtomicLock_REAL(&lock);
SDL_LockSpinlock_REAL(&lock);
if (!already_initialized) {
SDL_InitDynamicAPILocked();
already_initialized = SDL_TRUE;
}
SDL_AtomicUnlock_REAL(&lock);
SDL_UnlockSpinlock_REAL(&lock);
}
#else /* SDL_DYNAMIC_API */