summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-08 02:33:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-08 02:33:47 +0300
commit7496f94b0cfa1a2ae50d3381a7bfe081110b67f9 (patch)
treeea4a98c2f1032c7cba9d8a7284554a601fd8df8f /src/utils
parentc73b6f04aeb2266e0ea1bb61af309d4f0cc0f110 (diff)
downloadplus-7496f94b0cfa1a2ae50d3381a7bfe081110b67f9.tar.gz
plus-7496f94b0cfa1a2ae50d3381a7bfe081110b67f9.tar.bz2
plus-7496f94b0cfa1a2ae50d3381a7bfe081110b67f9.tar.xz
plus-7496f94b0cfa1a2ae50d3381a7bfe081110b67f9.zip
Fix compilation with old SDL 2 versions (before 2.0.4)
Some assert struct names was changed in 2.0.4
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sdl2logger.cpp6
1 files changed, 6 insertions, 0 deletions
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,