From bd989cb67f5076b07556e8422cf6f8be6ba8d8ae Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 18 Jun 2021 22:53:44 +0400 Subject: [PATCH] Fix OpenGL detection on WA_NativeWindow widgets. --- ui/gl/gl_detection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/gl/gl_detection.cpp b/ui/gl/gl_detection.cpp index 49e3339..7ee5767 100644 --- a/ui/gl/gl_detection.cpp +++ b/ui/gl/gl_detection.cpp @@ -56,8 +56,9 @@ Capabilities CheckCapabilities(QWidget *widget) { } const auto context = tester.context(); if (!context - || !context->isValid() - || !context->makeCurrent(tester.window()->windowHandle())) { + || !context->isValid()/* + // This check doesn't work for a widget with WA_NativeWindow. + || !context->makeCurrent(tester.window()->windowHandle())*/) { LOG_ONCE(("OpenGL: Could not create widget in a window.")); return {}; }