diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-12 21:31:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-12 21:31:38 +0300 |
commit | 96aaa9f5d56637373fe474b0113b9e6ba083a12a (patch) | |
tree | 5d11bff1cb34fd00b43eb7c96b5f4880fe74af03 | |
parent | d88285ef4d2b624a0c6a8ef5c2e157ed0248838e (diff) | |
download | plus-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.gz plus-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.bz2 plus-96aaa9f5d56637373fe474b0113b9e6ba083a12a.tar.xz plus-96aaa9f5d56637373fe474b0113b9e6ba083a12a.zip |
Fix error messages in tests in old SDL 2 versions.
-rw-r--r-- | src/utils/sdl2logger.cpp | 5 |
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); |