summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar fearlessTobi2018-09-01 19:01:53 +0200
committerGravatar fearlessTobi2018-09-01 19:01:53 +0200
commit0f453488e2e73a314b1286656fee4e407192f5fc (patch)
treec8674615e87897f3843c51faf6cc9c3ed9867d3d /src
parentMerge pull request #1196 from FearlessTobi/ccache-consistency (diff)
downloadyuzu-0f453488e2e73a314b1286656fee4e407192f5fc.tar.gz
yuzu-0f453488e2e73a314b1286656fee4e407192f5fc.tar.xz
yuzu-0f453488e2e73a314b1286656fee4e407192f5fc.zip
citra_qt: Display the unsupported GL extensions in the popup
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp16
-rw-r--r--src/yuzu/main.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index e11ba7854..cfc48a416 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -419,7 +419,7 @@ void GMainWindow::OnDisplayTitleBars(bool show) {
419 } 419 }
420} 420}
421 421
422bool GMainWindow::SupportsRequiredGLExtensions() { 422QStringList GMainWindow::GetUnsupportedGLExtensions() {
423 QStringList unsupported_ext; 423 QStringList unsupported_ext;
424 424
425 if (!GLAD_GL_ARB_program_interface_query) 425 if (!GLAD_GL_ARB_program_interface_query)
@@ -446,7 +446,7 @@ bool GMainWindow::SupportsRequiredGLExtensions() {
446 for (const QString& ext : unsupported_ext) 446 for (const QString& ext : unsupported_ext)
447 LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); 447 LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString());
448 448
449 return unsupported_ext.empty(); 449 return unsupported_ext;
450} 450}
451 451
452bool GMainWindow::LoadROM(const QString& filename) { 452bool GMainWindow::LoadROM(const QString& filename) {
@@ -464,11 +464,13 @@ bool GMainWindow::LoadROM(const QString& filename) {
464 return false; 464 return false;
465 } 465 }
466 466
467 if (!SupportsRequiredGLExtensions()) { 467 QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions();
468 QMessageBox::critical( 468 if (!unsupported_gl_extensions.empty()) {
469 this, tr("Error while initializing OpenGL Core!"), 469 QMessageBox::critical(this, tr("Error while initializing OpenGL Core!"),
470 tr("Your GPU may not support one or more required OpenGL extensions. Please " 470 tr("Your GPU may not support one or more required OpenGL"
471 "ensure you have the latest graphics driver. See the log for more details.")); 471 "extensions. Please ensure you have the latest graphics "
472 "driver.<br><br>Unsupported extensions:<br>") +
473 unsupported_gl_extensions.join("<br>"));
472 return false; 474 return false;
473 } 475 }
474 476
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 0b97e8220..3d6ebe329 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -85,7 +85,7 @@ private:
85 void ConnectWidgetEvents(); 85 void ConnectWidgetEvents();
86 void ConnectMenuEvents(); 86 void ConnectMenuEvents();
87 87
88 bool SupportsRequiredGLExtensions(); 88 QStringList GetUnsupportedGLExtensions();
89 bool LoadROM(const QString& filename); 89 bool LoadROM(const QString& filename);
90 void BootGame(const QString& filename); 90 void BootGame(const QString& filename);
91 void ShutdownGame(); 91 void ShutdownGame();