diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2020-11-10 04:55:05 +0100 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2020-11-10 04:55:05 +0100 |
commit | c433c0a746ad3826b4cbcf9f62b587e08dec03ad (patch) | |
tree | f3fd141b7e4483b055f6eb134b664bd0e247c133 | |
parent | bootmanager: Log and show GL_RENDERER string when GPU is insufficient (diff) | |
download | yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar.gz yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar.bz2 yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar.lz yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar.xz yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.tar.zst yuzu-c433c0a746ad3826b4cbcf9f62b587e08dec03ad.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 4481c749b..e38bc7a9a 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -604,28 +604,27 @@ bool GRenderWindow::LoadOpenGL() { auto context = CreateSharedContext(); auto scope = context->Acquire(); if (!gladLoadGL()) { - QMessageBox::critical( + QMessageBox::warning( this, tr("Error while initializing OpenGL!"), tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver.")); return false; } - QString renderer = QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); + const QString renderer = + QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); if (!GLAD_GL_VERSION_4_3) { - LOG_CRITICAL(Frontend, "GPU does not support OpenGL 4.3: {:s}", renderer.toStdString()); - QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3!"), - tr("Your GPU may not support OpenGL 4.3, or you do not have the " - "latest graphics driver.<br><br>GL Renderer:<br>%1") - .arg(renderer)); + LOG_ERROR(Frontend, "GPU does not support OpenGL 4.3: {}", renderer.toStdString()); + QMessageBox::warning(this, tr("Error while initializing OpenGL 4.3!"), + tr("Your GPU may not support OpenGL 4.3, or you do not have the " + "latest graphics driver.<br><br>GL Renderer:<br>%1") + .arg(renderer)); return false; } QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); if (!unsupported_gl_extensions.empty()) { - LOG_CRITICAL(Frontend, "GPU does not support all needed extensions: {:s}", - renderer.toStdString()); - QMessageBox::critical( + QMessageBox::warning( this, tr("Error while initializing OpenGL!"), tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you " "have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported " @@ -661,8 +660,13 @@ QStringList GRenderWindow::GetUnsupportedGLExtensions() const { if (!GLAD_GL_ARB_depth_buffer_float) unsupported_ext.append(QStringLiteral("ARB_depth_buffer_float")); - for (const QString& ext : unsupported_ext) - LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); + if (!unsupported_ext.empty()) { + LOG_ERROR(Frontend, "GPU does not support all required extensions: {}", + glGetString(GL_RENDERER)); + } + for (const QString& ext : unsupported_ext) { + LOG_ERROR(Frontend, "Unsupported GL extension: {}", ext.toStdString()); + } return unsupported_ext; } |