mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-23 12:25:39 +01:00
Merge pull request #1220 from FearlessTobi/extensions-qol
yuzu: Display the unsupported GL extensions in the popup
This commit is contained in:
commit
d2ade27c3f
@ -419,7 +419,7 @@ void GMainWindow::OnDisplayTitleBars(bool show) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GMainWindow::SupportsRequiredGLExtensions() {
|
QStringList GMainWindow::GetUnsupportedGLExtensions() {
|
||||||
QStringList unsupported_ext;
|
QStringList unsupported_ext;
|
||||||
|
|
||||||
if (!GLAD_GL_ARB_program_interface_query)
|
if (!GLAD_GL_ARB_program_interface_query)
|
||||||
@ -446,7 +446,7 @@ bool GMainWindow::SupportsRequiredGLExtensions() {
|
|||||||
for (const QString& ext : unsupported_ext)
|
for (const QString& ext : unsupported_ext)
|
||||||
LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString());
|
LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString());
|
||||||
|
|
||||||
return unsupported_ext.empty();
|
return unsupported_ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GMainWindow::LoadROM(const QString& filename) {
|
bool GMainWindow::LoadROM(const QString& filename) {
|
||||||
@ -464,11 +464,13 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SupportsRequiredGLExtensions()) {
|
QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions();
|
||||||
QMessageBox::critical(
|
if (!unsupported_gl_extensions.empty()) {
|
||||||
this, tr("Error while initializing OpenGL Core!"),
|
QMessageBox::critical(this, tr("Error while initializing OpenGL Core!"),
|
||||||
tr("Your GPU may not support one or more required OpenGL extensions. Please "
|
tr("Your GPU may not support one or more required OpenGL"
|
||||||
"ensure you have the latest graphics driver. See the log for more details."));
|
"extensions. Please ensure you have the latest graphics "
|
||||||
|
"driver.<br><br>Unsupported extensions:<br>") +
|
||||||
|
unsupported_gl_extensions.join("<br>"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ private:
|
|||||||
void ConnectWidgetEvents();
|
void ConnectWidgetEvents();
|
||||||
void ConnectMenuEvents();
|
void ConnectMenuEvents();
|
||||||
|
|
||||||
bool SupportsRequiredGLExtensions();
|
QStringList GetUnsupportedGLExtensions();
|
||||||
bool LoadROM(const QString& filename);
|
bool LoadROM(const QString& filename);
|
||||||
void BootGame(const QString& filename);
|
void BootGame(const QString& filename);
|
||||||
void ShutdownGame();
|
void ShutdownGame();
|
||||||
|
Loading…
Reference in New Issue
Block a user