X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af0b153364d2dbbb330ceb3b86b774877ac3e8a2..b9f933ab5d4a293790d0f5186c434229678c76ea:/src/msw/glcanvas.cpp diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index b93f1995cb..5cbfd68cfb 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -399,7 +399,6 @@ static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList) void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC) { - int pixelFormat; PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), /* size */ 1, /* version */ @@ -423,13 +422,13 @@ void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC) AdjustPFDForAttributes(pfd, attribList); - pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); + int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); if (pixelFormat == 0) { - wxLogWarning(_("ChoosePixelFormat failed.")); + wxLogLastError(_T("ChoosePixelFormat")); } else { - if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) { - wxLogWarning(_("SetPixelFormat failed.")); + if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) { + wxLogLastError(_T("SetPixelFormat")); } } }