Log: Simplify macros

This commit is contained in:
Stenzek
2024-05-23 20:55:28 +10:00
parent 792717e03e
commit 4e922a34a7
144 changed files with 2273 additions and 2363 deletions

View File

@ -29,7 +29,7 @@ static bool ReloadWGL(HDC dc)
{
if (!gladLoadWGL(dc, [](const char* name) { return (GLADapiproc)wglGetProcAddress(name); }))
{
Log_ErrorPrint("Loading GLAD WGL functions failed");
ERROR_LOG("Loading GLAD WGL functions failed");
return false;
}
@ -112,14 +112,14 @@ bool OpenGLContextWGL::ChangeSurface(const WindowInfo& new_wi)
m_wi = new_wi;
if (!InitializeDC(&error))
{
Log_ErrorFmt("Failed to change surface: {}", error.GetDescription());
ERROR_LOG("Failed to change surface: {}", error.GetDescription());
return false;
}
if (was_current && !wglMakeCurrent(m_dc, m_rc))
{
error.SetWin32(GetLastError());
Log_ErrorFmt("Failed to make context current again after surface change: {}", error.GetDescription());
ERROR_LOG("Failed to make context current again after surface change: {}", error.GetDescription());
return false;
}
@ -148,7 +148,7 @@ bool OpenGLContextWGL::MakeCurrent()
{
if (!wglMakeCurrent(m_dc, m_rc))
{
Log_ErrorFmt("wglMakeCurrent() failed: {}", GetLastError());
ERROR_LOG("wglMakeCurrent() failed: {}", GetLastError());
return false;
}