diff options
| author | Léo Lam <leo@leolam.fr> | 2020-12-02 20:45:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-02 20:45:27 +0100 |
| commit | b148b56fba41e2beb81c61e4d84bbecad0f33a53 (patch) | |
| tree | 9588abb91d50ca660e9f832eb8d751be73a8413d /Source/Core/Common/GL/GLInterface/WGL.cpp | |
| parent | 00f2e0e494f644d0a559dc92f9eb94be0fab6913 (diff) | |
| parent | 139d4fc76e4ddf45179ca5ec5e42c52ef513ea4d (diff) | |
Merge pull request #9304 from lioncash/panic
General: Convert PanicAlerts over to fmt equivalent
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/WGL.cpp')
| -rw-r--r-- | Source/Core/Common/GL/GLInterface/WGL.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/Common/GL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp index cf30dcf5e3..33d30c0a71 100644 --- a/Source/Core/Common/GL/GLInterface/WGL.cpp +++ b/Source/Core/Common/GL/GLInterface/WGL.cpp @@ -277,27 +277,27 @@ bool GLContextWGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor m_dc = GetDC(m_window_handle); if (!m_dc) { - PanicAlert("(1) Can't create an OpenGL Device context. Fail."); + PanicAlertFmt("(1) Can't create an OpenGL Device context. Fail."); return false; } - int pixel_format = ChoosePixelFormat(m_dc, &pfd); - if (!pixel_format) + const int pixel_format = ChoosePixelFormat(m_dc, &pfd); + if (pixel_format == 0) { - PanicAlert("(2) Can't find a suitable PixelFormat."); + PanicAlertFmt("(2) Can't find a suitable PixelFormat."); return false; } if (!SetPixelFormat(m_dc, pixel_format, &pfd)) { - PanicAlert("(3) Can't set the PixelFormat."); + PanicAlertFmt("(3) Can't set the PixelFormat."); return false; } m_rc = wglCreateContext(m_dc); if (!m_rc) { - PanicAlert("(4) Can't create an OpenGL rendering context."); + PanicAlertFmt("(4) Can't create an OpenGL rendering context."); return false; } @@ -310,7 +310,7 @@ bool GLContextWGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor // This is because we need an active context to use wglCreateContextAttribsARB. if (!wglMakeCurrent(m_dc, m_rc)) { - PanicAlert("(5) Can't make dummy WGL context current."); + PanicAlertFmt("(5) Can't make dummy WGL context current."); return false; } @@ -324,7 +324,7 @@ bool GLContextWGL::Initialize(const WindowSystemInfo& wsi, bool stereo, bool cor // context. If we didn't get a core context, the caller expects that the context is not current. if (!wglMakeCurrent(m_dc, nullptr)) { - PanicAlert("(6) Failed to switch out temporary context"); + PanicAlertFmt("(6) Failed to switch out temporary context"); return false; } |
