summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/bootmanager.cpp36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 408eac2b7..e38bc7a9a 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -10,6 +10,7 @@
10#include <QMessageBox> 10#include <QMessageBox>
11#include <QPainter> 11#include <QPainter>
12#include <QScreen> 12#include <QScreen>
13#include <QString>
13#include <QStringList> 14#include <QStringList>
14#include <QWindow> 15#include <QWindow>
15 16
@@ -603,19 +604,33 @@ bool GRenderWindow::LoadOpenGL() {
603 auto context = CreateSharedContext(); 604 auto context = CreateSharedContext();
604 auto scope = context->Acquire(); 605 auto scope = context->Acquire();
605 if (!gladLoadGL()) { 606 if (!gladLoadGL()) {
606 QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3!"), 607 QMessageBox::warning(
607 tr("Your GPU may not support OpenGL 4.3, or you do not have the " 608 this, tr("Error while initializing OpenGL!"),
608 "latest graphics driver.")); 609 tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver."));
610 return false;
611 }
612
613 const QString renderer =
614 QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER)));
615
616 if (!GLAD_GL_VERSION_4_3) {
617 LOG_ERROR(Frontend, "GPU does not support OpenGL 4.3: {}", renderer.toStdString());
618 QMessageBox::warning(this, tr("Error while initializing OpenGL 4.3!"),
619 tr("Your GPU may not support OpenGL 4.3, or you do not have the "
620 "latest graphics driver.<br><br>GL Renderer:<br>%1")
621 .arg(renderer));
609 return false; 622 return false;
610 } 623 }
611 624
612 QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); 625 QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions();
613 if (!unsupported_gl_extensions.empty()) { 626 if (!unsupported_gl_extensions.empty()) {
614 QMessageBox::critical( 627 QMessageBox::warning(
615 this, tr("Error while initializing OpenGL!"), 628 this, tr("Error while initializing OpenGL!"),
616 tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you " 629 tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you "
617 "have the latest graphics driver.<br><br>Unsupported extensions:<br>") + 630 "have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported "
618 unsupported_gl_extensions.join(QStringLiteral("<br>"))); 631 "extensions:<br>%2")
632 .arg(renderer)
633 .arg(unsupported_gl_extensions.join(QStringLiteral("<br>"))));
619 return false; 634 return false;
620 } 635 }
621 return true; 636 return true;
@@ -645,8 +660,13 @@ QStringList GRenderWindow::GetUnsupportedGLExtensions() const {
645 if (!GLAD_GL_ARB_depth_buffer_float) 660 if (!GLAD_GL_ARB_depth_buffer_float)
646 unsupported_ext.append(QStringLiteral("ARB_depth_buffer_float")); 661 unsupported_ext.append(QStringLiteral("ARB_depth_buffer_float"));
647 662
648 for (const QString& ext : unsupported_ext) 663 if (!unsupported_ext.empty()) {
649 LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); 664 LOG_ERROR(Frontend, "GPU does not support all required extensions: {}",
665 glGetString(GL_RENDERER));
666 }
667 for (const QString& ext : unsupported_ext) {
668 LOG_ERROR(Frontend, "Unsupported GL extension: {}", ext.toStdString());
669 }
650 670
651 return unsupported_ext; 671 return unsupported_ext;
652} 672}