diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-10-23 14:41:30 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-10-23 14:58:03 -0400 |
| commit | 4e8df93f4179a684b507d9c712b7e8121fc83119 (patch) | |
| tree | 2d4257714fcad53325789389e22ff35087a7c28c /Source/Core/Common/GL/GLInterface/EGL.cpp | |
| parent | 4f5c8bb42ae617a5c2823277a4a9ced1df2be445 (diff) | |
Common: Migrate logging to fmt
Continues the migration of our code over to the fmt logger.
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/EGL.cpp')
| -rw-r--r-- | Source/Core/Common/GL/GLInterface/EGL.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Source/Core/Common/GL/GLInterface/EGL.cpp b/Source/Core/Common/GL/GLInterface/EGL.cpp index 6163754095..13a8bc0eb9 100644 --- a/Source/Core/Common/GL/GLInterface/EGL.cpp +++ b/Source/Core/Common/GL/GLInterface/EGL.cpp @@ -78,7 +78,7 @@ void GLContextEGL::DetectMode() // Get how many configs there are if (!eglChooseConfig(m_egl_display, attribs, nullptr, 0, &num_configs)) { - INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config"); + INFO_LOG_FMT(VIDEO, "Error: couldn't get an EGL visual config"); continue; } @@ -87,7 +87,7 @@ void GLContextEGL::DetectMode() // Get all the configurations if (!eglChooseConfig(m_egl_display, attribs, config, num_configs, &num_configs)) { - INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config"); + INFO_LOG_FMT(VIDEO, "Error: couldn't get an EGL visual config"); delete[] config; continue; } @@ -110,18 +110,18 @@ void GLContextEGL::DetectMode() if (supportsGL) { - INFO_LOG(VIDEO, "Using OpenGL"); + INFO_LOG_FMT(VIDEO, "Using OpenGL"); m_opengl_mode = Mode::OpenGL; } else if (supportsGLES3) { - INFO_LOG(VIDEO, "Using OpenGL|ES"); + INFO_LOG_FMT(VIDEO, "Using OpenGL|ES"); m_opengl_mode = Mode::OpenGLES; } else { // Errored before we found a mode - ERROR_LOG(VIDEO, "Error: Failed to detect OpenGL flavour, falling back to OpenGL"); + ERROR_LOG_FMT(VIDEO, "Error: Failed to detect OpenGL flavour, falling back to OpenGL"); // This will fail to create a context, as it'll try to use the same attribs we just failed to // find a matching config with m_opengl_mode = Mode::OpenGL; @@ -149,13 +149,13 @@ bool GLContextEGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor m_egl_display = OpenEGLDisplay(); if (!m_egl_display) { - INFO_LOG(VIDEO, "Error: eglGetDisplay() failed"); + INFO_LOG_FMT(VIDEO, "Error: eglGetDisplay() failed"); return false; } if (!eglInitialize(m_egl_display, &egl_major, &egl_minor)) { - INFO_LOG(VIDEO, "Error: eglInitialize() failed"); + INFO_LOG_FMT(VIDEO, "Error: eglInitialize() failed"); return false; } @@ -191,13 +191,13 @@ bool GLContextEGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor ctx_attribs = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE}; break; default: - ERROR_LOG(VIDEO, "Unknown opengl mode set"); + ERROR_LOG_FMT(VIDEO, "Unknown opengl mode set"); return false; } if (!eglChooseConfig(m_egl_display, attribs, &m_config, 1, &num_configs)) { - INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config"); + INFO_LOG_FMT(VIDEO, "Error: couldn't get an EGL visual config"); return false; } @@ -247,13 +247,13 @@ bool GLContextEGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor if (!m_egl_context) { - INFO_LOG(VIDEO, "Error: eglCreateContext failed"); + INFO_LOG_FMT(VIDEO, "Error: eglCreateContext failed"); return false; } if (!CreateWindowSurface()) { - ERROR_LOG(VIDEO, "Error: CreateWindowSurface failed 0x%04x", eglGetError()); + ERROR_LOG_FMT(VIDEO, "Error: CreateWindowSurface failed {:#06x}", eglGetError()); return false; } @@ -267,7 +267,7 @@ std::unique_ptr<GLContext> GLContextEGL::CreateSharedContext() eglCreateContext(m_egl_display, m_config, m_egl_context, m_attribs.data()); if (!new_egl_context) { - INFO_LOG(VIDEO, "Error: eglCreateContext failed 0x%04x", eglGetError()); + INFO_LOG_FMT(VIDEO, "Error: eglCreateContext failed {:#06x}", eglGetError()); return nullptr; } @@ -281,7 +281,7 @@ std::unique_ptr<GLContext> GLContextEGL::CreateSharedContext() new_context->m_is_shared = true; if (!new_context->CreateWindowSurface()) { - ERROR_LOG(VIDEO, "Error: CreateWindowSurface failed 0x%04x", eglGetError()); + ERROR_LOG_FMT(VIDEO, "Error: CreateWindowSurface failed {:#06x}", eglGetError()); return nullptr; } @@ -296,7 +296,7 @@ bool GLContextEGL::CreateWindowSurface() m_egl_surface = eglCreateWindowSurface(m_egl_display, m_config, native_window, nullptr); if (!m_egl_surface) { - INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed"); + INFO_LOG_FMT(VIDEO, "Error: eglCreateWindowSurface failed"); return false; } @@ -305,8 +305,8 @@ bool GLContextEGL::CreateWindowSurface() if (!eglQuerySurface(m_egl_display, m_egl_surface, EGL_WIDTH, &surface_width) || !eglQuerySurface(m_egl_display, m_egl_surface, EGL_HEIGHT, &surface_height)) { - WARN_LOG(VIDEO, - "Failed to get surface dimensions via eglQuerySurface. Size may be incorrect."); + WARN_LOG_FMT(VIDEO, + "Failed to get surface dimensions via eglQuerySurface. Size may be incorrect."); } m_backbuffer_width = static_cast<int>(surface_width); m_backbuffer_height = static_cast<int>(surface_height); @@ -319,7 +319,7 @@ bool GLContextEGL::CreateWindowSurface() m_egl_surface = eglCreatePbufferSurface(m_egl_display, m_config, attrib_list); if (!m_egl_surface) { - INFO_LOG(VIDEO, "Error: eglCreatePbufferSurface failed"); + INFO_LOG_FMT(VIDEO, "Error: eglCreatePbufferSurface failed"); return false; } } @@ -338,7 +338,7 @@ void GLContextEGL::DestroyWindowSurface() if (eglGetCurrentSurface(EGL_DRAW) == m_egl_surface) eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (!eglDestroySurface(m_egl_display, m_egl_surface)) - NOTICE_LOG(VIDEO, "Could not destroy window surface."); + NOTICE_LOG_FMT(VIDEO, "Could not destroy window surface."); m_egl_surface = EGL_NO_SURFACE; } @@ -370,9 +370,9 @@ void GLContextEGL::DestroyContext() if (eglGetCurrentContext() == m_egl_context) eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (!eglDestroyContext(m_egl_display, m_egl_context)) - NOTICE_LOG(VIDEO, "Could not destroy drawing context."); + NOTICE_LOG_FMT(VIDEO, "Could not destroy drawing context."); if (!m_is_shared && !eglTerminate(m_egl_display)) - NOTICE_LOG(VIDEO, "Could not destroy display connection."); + NOTICE_LOG_FMT(VIDEO, "Could not destroy display connection."); m_egl_context = EGL_NO_CONTEXT; m_egl_display = EGL_NO_DISPLAY; } |
