Skip to content

Commit

Permalink
reverting change to SDL_AtomicTryLock, seems DreamSDK doesn't define …
Browse files Browse the repository at this point in the history
…HAVE_GCC_ATOMICS, so it now does that for all dreamcast builds.
  • Loading branch information
GPF committed Sep 6, 2024
1 parent 6a95ce1 commit ded326f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/atomic/SDL_spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
#endif

#if defined(__DREAMCAST__)
#include <arch/spinlock.h>
// #include <arch/spinlock.h>
#define HAVE_GCC_ATOMICS 1
#endif

#if !defined(HAVE_GCC_ATOMICS) && defined(__MACOSX__)
Expand Down Expand Up @@ -167,12 +168,12 @@ SDL_bool SDL_AtomicTryLock(SDL_SpinLock *lock)
EIntr();
}
return res;
#elif defined(__DREAMCAST__)
if (spinlock_trylock(lock)) {
return SDL_TRUE;
} else {
return SDL_FALSE;
}
// #elif defined(__DREAMCAST__)
// if (spinlock_trylock(lock)) {
// return SDL_TRUE;
// } else {
// return SDL_FALSE;
// }
#else
#error Please implement for your platform.
return SDL_FALSE;
Expand Down

0 comments on commit ded326f

Please sign in to comment.