From 91c1edf2105c12aae1c453eeaea288460decca9c Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Thu, 30 Sep 2021 17:08:21 -0700 Subject: [PATCH] main: updated detection --- app/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index eb4b7ef44..5bba4dc69 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -44,6 +44,8 @@ extern "C" { #include "version.h" #ifdef _WIN32 +#include +#include #include #endif @@ -216,7 +218,16 @@ int main(int argc, char *argv[]) // when no driver is installed (e.g. when using the Microsoft Basic Display Adapter). Whether // that's true for all users or not is still up in the air, but what we do know is it's a driver // issue and users should know what to do rather than simply receive a cryptic crash report. - if (!wglGetProcAddress("glGenFramebuffers")) { + QOpenGLContext ctx; + ctx.create(); + QOffscreenSurface surface; + surface.create(); + ctx.makeCurrent(&surface); + bool has_proc_address = wglGetProcAddress("glGenFramebuffers"); + ctx.doneCurrent(); + surface.destroy(); + + if (!has_proc_address) { QString msg = QCoreApplication::translate("main", "Your computer's graphics driver does not appear to support framebuffers. " "This means either your graphics driver is not up-to-date or your graphics card is too old to run Olive.\n\n"