@@ -96,7 +96,7 @@ bool ContextWGL::ChangeSurface(const WindowInfo& new_wi)
9696
9797 if (was_current && !wglMakeCurrent (m_dc, m_rc))
9898 {
99- Log_ErrorPrintf (" Failed to make context current again after surface change: 0x%08X " , GetLastError ());
99+ Log_ErrorPrintf (" Failed to make context current again after surface change: 0x%08lX " , GetLastError ());
100100 return false ;
101101 }
102102
@@ -120,7 +120,7 @@ bool ContextWGL::MakeCurrent()
120120{
121121 if (!wglMakeCurrent (m_dc, m_rc))
122122 {
123- Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08X " , GetLastError ());
123+ Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08lX " , GetLastError ());
124124 return false ;
125125 }
126126
@@ -185,7 +185,7 @@ HDC ContextWGL::GetDCAndSetPixelFormat(HWND hwnd)
185185 HDC hDC = ::GetDC (hwnd);
186186 if (!hDC)
187187 {
188- Log_ErrorPrintf (" GetDC() failed: 0x%08X " , GetLastError ());
188+ Log_ErrorPrintf (" GetDC() failed: 0x%08lX " , GetLastError ());
189189 return {};
190190 }
191191
@@ -194,7 +194,7 @@ HDC ContextWGL::GetDCAndSetPixelFormat(HWND hwnd)
194194 const int pf = ChoosePixelFormat (hDC, &pfd);
195195 if (pf == 0 )
196196 {
197- Log_ErrorPrintf (" ChoosePixelFormat() failed: 0x%08X " , GetLastError ());
197+ Log_ErrorPrintf (" ChoosePixelFormat() failed: 0x%08lX " , GetLastError ());
198198 ::ReleaseDC (hwnd, hDC);
199199 return {};
200200 }
@@ -204,7 +204,7 @@ HDC ContextWGL::GetDCAndSetPixelFormat(HWND hwnd)
204204
205205 if (!SetPixelFormat (hDC, m_pixel_format.value (), &pfd))
206206 {
207- Log_ErrorPrintf (" SetPixelFormat() failed: 0x%08X " , GetLastError ());
207+ Log_ErrorPrintf (" SetPixelFormat() failed: 0x%08lX " , GetLastError ());
208208 ::ReleaseDC (hwnd, hDC);
209209 return {};
210210 }
@@ -338,15 +338,15 @@ bool ContextWGL::CreateAnyContext(HGLRC share_context, bool make_current)
338338 m_rc = wglCreateContext (m_dc);
339339 if (!m_rc)
340340 {
341- Log_ErrorPrintf (" wglCreateContext() failed: 0x%08X " , GetLastError ());
341+ Log_ErrorPrintf (" wglCreateContext() failed: 0x%08lX " , GetLastError ());
342342 return false ;
343343 }
344344
345345 if (make_current)
346346 {
347347 if (!wglMakeCurrent (m_dc, m_rc))
348348 {
349- Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08X " , GetLastError ());
349+ Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08lX " , GetLastError ());
350350 return false ;
351351 }
352352
@@ -360,7 +360,7 @@ bool ContextWGL::CreateAnyContext(HGLRC share_context, bool make_current)
360360
361361 if (share_context && !wglShareLists (share_context, m_rc))
362362 {
363- Log_ErrorPrintf (" wglShareLists() failed: 0x%08X " , GetLastError ());
363+ Log_ErrorPrintf (" wglShareLists() failed: 0x%08lX " , GetLastError ());
364364 return false ;
365365 }
366366
@@ -432,7 +432,7 @@ bool ContextWGL::CreateVersionContext(const Version& version, HGLRC share_contex
432432 {
433433 if (!wglMakeCurrent (m_dc, make_current ? new_rc : nullptr ))
434434 {
435- Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08X " , GetLastError ());
435+ Log_ErrorPrintf (" wglMakeCurrent() failed: 0x%08lX " , GetLastError ());
436436 wglDeleteContext (new_rc);
437437 return false ;
438438 }
0 commit comments