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 committed 2024-01-18 04:41:34 -08:00
1 parent 4e60fc9b2b
commit a2665f54c8
24 files changed
+156 -112

No files matched your search

+3 -3
View File
@@ -333,15 +333,15 @@ SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data, const char *func, cons
#ifndef SDL_THREADS_DISABLED
static SDL_SpinLock spinlock = 0;
SDL_AtomicLock(&spinlock);
SDL_LockSpinlock(&spinlock);
if (!assertion_mutex) { /* never called SDL_Init()? */
assertion_mutex = SDL_CreateMutex();
if (!assertion_mutex) {
SDL_AtomicUnlock(&spinlock);
SDL_UnlockSpinlock(&spinlock);
return SDL_ASSERTION_IGNORE; /* oh well, I guess. */
}
}
SDL_AtomicUnlock(&spinlock);
SDL_UnlockSpinlock(&spinlock);
SDL_LockMutex(assertion_mutex);
#endif /* !SDL_THREADS_DISABLED */