From 065ca18e19b2187393c912aec292b233a13d03bb Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Sat, 28 May 2022 16:25:58 +0000 Subject: [PATCH] Fix SDL assert 2 --- ion/src/simulator/external/sdl/include/SDL_stdinc.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ion/src/simulator/external/sdl/include/SDL_stdinc.h b/ion/src/simulator/external/sdl/include/SDL_stdinc.h index 326586195..8845cd771 100644 --- a/ion/src/simulator/external/sdl/include/SDL_stdinc.h +++ b/ion/src/simulator/external/sdl/include/SDL_stdinc.h @@ -309,8 +309,13 @@ typedef uint64_t Uint64; #endif #endif /* SDL_DISABLE_ANALYZE_MACROS */ -#define SDL_COMPILE_TIME_ASSERT(name, x) \ - static_assert(x) +#ifndef __3DS__ +#define SDL_COMPILE_TIME_ASSERT(name, x) \ + typedef int SDL_dummy_ ## name[(x) * 2 - 1] +#else +#define SDL_COMPILE_TIME_ASSERT(name, x) \ + typedef int SDL_dummy_ ## name[0] +#endif /** \cond */ #ifndef DOXYGEN_SHOULD_IGNORE_THIS SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); @@ -339,7 +344,7 @@ typedef enum DUMMY_ENUM_VALUE } SDL_DUMMY_ENUM; -// SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); #endif #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ /** \endcond */