summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-12 21:31:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-12 21:31:38 +0300
commit96aaa9f5d56637373fe474b0113b9e6ba083a12a (patch)
tree5d11bff1cb34fd00b43eb7c96b5f4880fe74af03 /src
parentd88285ef4d2b624a0c6a8ef5c2e157ed0248838e (diff)
downloadmanaverse-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.gz
manaverse-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.bz2
manaverse-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.xz
manaverse-96aaa9f5d56637373fe474b0113b9e6ba083a12a.zip
Fix error messages in tests in old SDL 2 versions.
Diffstat (limited to 'src')
-rw-r--r--src/utils/sdl2logger.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/sdl2logger.cpp b/src/utils/sdl2logger.cpp
index 98c7d8338..9edac9a29 100644
--- a/src/utils/sdl2logger.cpp
+++ b/src/utils/sdl2logger.cpp
@@ -135,7 +135,12 @@ static SDL_AssertState assertCallback(const SDL_AssertData *data,
void SDL2Logger::init()
{
#ifdef UNITTESTS
+#if SDL_VERSION_ATLEAST(2, 0, 4)
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
+#else // SDL_VERSION_ATLEAST(2, 0, 4)
+ // versions below 2.0.4 report OpenGL error even if OpenGL was not used
+ SDL_LogSetAllPriority(SDL_LOG_PRIORITY_CRITICAL);
+#endif // SDL_VERSION_ATLEAST(2, 0, 4)
#else // UNITTESTS
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_VERBOSE);