From 03bd1350605cc66671b7a6ec1c5f437e76f3abd9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 14 Sep 2019 23:49:21 +1000 Subject: [PATCH] SDL: Make GL debug output less noisy in Release --- src/pse-sdl/sdl_interface.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pse-sdl/sdl_interface.cpp b/src/pse-sdl/sdl_interface.cpp index 337a87b92..45a918861 100644 --- a/src/pse-sdl/sdl_interface.cpp +++ b/src/pse-sdl/sdl_interface.cpp @@ -54,7 +54,21 @@ bool SDLInterface::CreateSDLWindow() static void APIENTRY GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) { - Log_InfoPrintf("%s", message); + switch (severity) + { + case GL_DEBUG_SEVERITY_HIGH_KHR: + Log_InfoPrint(message); + break; + case GL_DEBUG_SEVERITY_MEDIUM_KHR: + Log_WarningPrint(message); + break; + case GL_DEBUG_SEVERITY_LOW_KHR: + Log_InfoPrintf(message); + break; + case GL_DEBUG_SEVERITY_NOTIFICATION: + Log_DebugPrint(message); + break; + } } bool SDLInterface::CreateGLContext()