summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 8c41cc135d..1a7be0d271 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -1301,7 +1301,10 @@ bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface)
&& QOpenGLStaticContext::opengl32.wglGetCurrentDC() == contextData->hdc) {
return true;
}
- return QOpenGLStaticContext::opengl32.wglMakeCurrent(contextData->hdc, contextData->renderingContext);
+ const bool success = QOpenGLStaticContext::opengl32.wglMakeCurrent(contextData->hdc, contextData->renderingContext);
+ if (!success)
+ qErrnoWarning("%s: wglMakeCurrent() failed for existing context data", __FUNCTION__);
+ return success;
}
// Create a new entry.
const QOpenGLContextData newContext(m_renderingContext, hwnd, GetDC(hwnd));
@@ -1329,6 +1332,8 @@ bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface)
qCDebug(lcQpaGl) << "makeCurrent(): context loss detected" << this;
// Drop the surface. Will recreate on the next makeCurrent.
window->invalidateSurface();
+ } else {
+ qErrnoWarning("%s: wglMakeCurrent() failed", __FUNCTION__);
}
}