From 96aaa9f5d56637373fe474b0113b9e6ba083a12a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 12 Sep 2017 21:31:38 +0300 Subject: Fix error messages in tests in old SDL 2 versions. --- src/utils/sdl2logger.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3-70-g09d2