diff options
author | Lioncash <mathew1800@gmail.com> | 2018-04-27 17:52:18 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-04-27 18:09:35 +0200 |
commit | 16198f979eff5ad921887ccebc67dbbcb88884bf (patch) | |
tree | 79ef2b2146ef2024948a3de97496af0a01d71ad7 /src/video_core | |
parent | core: Replace usages of LOG_GENERIC with new fmt-capable equivalents (diff) | |
download | yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar.gz yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar.bz2 yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar.lz yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar.xz yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.tar.zst yuzu-16198f979eff5ad921887ccebc67dbbcb88884bf.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 77d1692f4..3440d2190 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -398,21 +398,22 @@ static const char* GetType(GLenum type) { static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* user_param) { - Log::Level level; + const char format[] = "{} {} {}: {}"; + const char* const str_source = GetSource(source); + const char* const str_type = GetType(type); + switch (severity) { case GL_DEBUG_SEVERITY_HIGH: - level = Log::Level::Error; + NGLOG_ERROR(Render_OpenGL, format, str_source, str_type, id, message); break; case GL_DEBUG_SEVERITY_MEDIUM: - level = Log::Level::Warning; + NGLOG_WARNING(Render_OpenGL, format, str_source, str_type, id, message); break; case GL_DEBUG_SEVERITY_NOTIFICATION: case GL_DEBUG_SEVERITY_LOW: - level = Log::Level::Debug; + NGLOG_DEBUG(Render_OpenGL, format, str_source, str_type, id, message); break; } - LOG_GENERIC(Log::Class::Render_OpenGL, level, "%s %s %d: %s", GetSource(source), GetType(type), - id, message); } /// Initialize the renderer |