Fix -Wundef warnings due to use of unguarded SDL_ATOMIC_DISABLED

This commit is contained in:
Anonymous Maarten
2023-03-27 15:05:05 +02:00
parent 8454cabc46
commit 93b357a0d2
2 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ extern __inline int _SDL_xchg_watcom(volatile int *a, int v);
SDL_bool
SDL_AtomicTryLock(SDL_SpinLock *lock)
{
#if SDL_ATOMIC_DISABLED
#if defined(SDL_ATOMIC_DISABLED)
/* Terrible terrible damage */
static SDL_mutex *_spinlock_mutex;

View File

@@ -484,7 +484,7 @@ static void SDL_InitDynamicAPI(void)
/* SDL_AtomicLock calls SDL mutex functions to emulate if
SDL_ATOMIC_DISABLED, which we can't do here, so in such a
configuration, you're on your own. */
#if !SDL_ATOMIC_DISABLED
#ifndef SDL_ATOMIC_DISABLED
static SDL_SpinLock lock = 0;
SDL_AtomicLock_REAL(&lock);
#endif
@@ -494,7 +494,7 @@ static void SDL_InitDynamicAPI(void)
already_initialized = SDL_TRUE;
}
#if !SDL_ATOMIC_DISABLED
#ifndef SDL_ATOMIC_DISABLED
SDL_AtomicUnlock_REAL(&lock);
#endif
}