From 93f85535eba68962953f2728658194c27ab60857 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 5 Feb 2020 17:42:50 +0900 Subject: [PATCH] Qt: Handle creation of ES contexts even when it wasn't specified --- src/duckstation-qt/opengldisplaywindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/duckstation-qt/opengldisplaywindow.cpp b/src/duckstation-qt/opengldisplaywindow.cpp index 5bfdae870..79fbcd422 100644 --- a/src/duckstation-qt/opengldisplaywindow.cpp +++ b/src/duckstation-qt/opengldisplaywindow.cpp @@ -224,7 +224,6 @@ bool OpenGLDisplayWindow::createDeviceContext(QThread* worker_thread, bool debug surface_format.setSwapInterval(0); surface_format.setRenderableType(QSurfaceFormat::OpenGL); surface_format.setProfile(QSurfaceFormat::CoreProfile); - if (debug_device) surface_format.setOption(QSurfaceFormat::DebugContext); @@ -234,14 +233,15 @@ bool OpenGLDisplayWindow::createDeviceContext(QThread* worker_thread, bool debug m_gl_context->setFormat(surface_format); if (m_gl_context->create()) { - Log_InfoPrintf("Got a desktop OpenGL %d.%d context", major, minor); + m_is_gles = m_gl_context->isOpenGLES(); + Log_InfoPrintf("Got a %s %d.%d context", major, minor, m_is_gles ? "OpenGL ES" : "desktop OpenGL"); break; } } if (!m_gl_context) { - // try es + // try forcing ES surface_format.setRenderableType(QSurfaceFormat::OpenGLES); surface_format.setProfile(QSurfaceFormat::NoProfile); if (debug_device)