From 7496f94b0cfa1a2ae50d3381a7bfe081110b67f9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 8 Sep 2017 02:33:47 +0300 Subject: Fix compilation with old SDL 2 versions (before 2.0.4) Some assert struct names was changed in 2.0.4 --- src/utils/sdl2logger.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/sdl2logger.cpp b/src/utils/sdl2logger.cpp index 97a6200df..7f7813521 100644 --- a/src/utils/sdl2logger.cpp +++ b/src/utils/sdl2logger.cpp @@ -37,6 +37,12 @@ PRAGMA48(GCC diagnostic pop) message.append(msg); \ break +// before 2.0.4 this names not exists +#if !SDL_VERSION_ATLEAST(2, 0, 4) +#define SDL_AssertState SDL_assert_state +#define SDL_AssertData SDL_assert_data +#endif // !SDL_VERSION_ATLEAST(2, 0, 4) + static void logCallback(void *userData A_UNUSED, int category, SDL_LogPriority priority, -- cgit v1.2.3-70-g09d2