diff options
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 408eac2b7..4481c749b 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,34 @@ 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()) { |
| 607 | QMessageBox::critical( | ||
| 608 | this, tr("Error while initializing OpenGL!"), | ||
| 609 | tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver.")); | ||
| 610 | return false; | ||
| 611 | } | ||
| 612 | |||
| 613 | QString renderer = QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); | ||
| 614 | |||
| 615 | if (!GLAD_GL_VERSION_4_3) { | ||
| 616 | LOG_CRITICAL(Frontend, "GPU does not support OpenGL 4.3: {:s}", renderer.toStdString()); | ||
| 606 | QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3!"), | 617 | QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3!"), |
| 607 | tr("Your GPU may not support OpenGL 4.3, or you do not have the " | 618 | tr("Your GPU may not support OpenGL 4.3, or you do not have the " |
| 608 | "latest graphics driver.")); | 619 | "latest graphics driver.<br><br>GL Renderer:<br>%1") |
| 620 | .arg(renderer)); | ||
| 609 | return false; | 621 | return false; |
| 610 | } | 622 | } |
| 611 | 623 | ||
| 612 | QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); | 624 | QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); |
| 613 | if (!unsupported_gl_extensions.empty()) { | 625 | if (!unsupported_gl_extensions.empty()) { |
| 626 | LOG_CRITICAL(Frontend, "GPU does not support all needed extensions: {:s}", | ||
| 627 | renderer.toStdString()); | ||
| 614 | QMessageBox::critical( | 628 | QMessageBox::critical( |
| 615 | this, tr("Error while initializing OpenGL!"), | 629 | this, tr("Error while initializing OpenGL!"), |
| 616 | tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you " | 630 | 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>") + | 631 | "have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported " |
| 618 | unsupported_gl_extensions.join(QStringLiteral("<br>"))); | 632 | "extensions:<br>%2") |
| 633 | .arg(renderer) | ||
| 634 | .arg(unsupported_gl_extensions.join(QStringLiteral("<br>")))); | ||
| 619 | return false; | 635 | return false; |
| 620 | } | 636 | } |
| 621 | return true; | 637 | return true; |