diff options
author | BreadFish64 <mohror64@gmail.com> | 2018-05-30 22:38:22 +0200 |
---|---|---|
committer | BreadFish64 <mohror64@gmail.com> | 2018-06-04 19:26:30 +0200 |
commit | 0641950f9a4e7f4f6a4a828ec3a7840a57c29b77 (patch) | |
tree | 3d4c1ad56231bbca12c5597c9b40b3ccf08845c2 /src | |
parent | Merge pull request #483 from bunnei/sonic (diff) | |
download | yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar.gz yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar.bz2 yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar.lz yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar.xz yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.tar.zst yuzu-0641950f9a4e7f4f6a4a828ec3a7840a57c29b77.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 26 | ||||
-rw-r--r-- | src/yuzu/main.h | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index a5d7807e2..3038bd6da 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -335,6 +335,24 @@ void GMainWindow::OnDisplayTitleBars(bool show) { } } +bool GMainWindow::SupportsRequiredGLExtensions() { + QStringList unsupported_ext; + + if (!GLAD_GL_ARB_program_interface_query) + unsupported_ext.append("ARB_program_interface_query"); + if (!GLAD_GL_ARB_separate_shader_objects) + unsupported_ext.append("ARB_separate_shader_objects"); + if (!GLAD_GL_ARB_shader_storage_buffer_object) + unsupported_ext.append("ARB_shader_storage_buffer_object"); + if (!GLAD_GL_ARB_vertex_attrib_binding) + unsupported_ext.append("ARB_vertex_attrib_binding"); + + for (const QString& ext : unsupported_ext) + NGLOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); + + return unsupported_ext.empty(); +} + bool GMainWindow::LoadROM(const QString& filename) { // Shutdown previous session if the emu thread is still active... if (emu_thread != nullptr) @@ -350,6 +368,14 @@ bool GMainWindow::LoadROM(const QString& filename) { return false; } + if (!SupportsRequiredGLExtensions()) { + QMessageBox::critical( + this, tr("Error while initializing OpenGL Core!"), + tr("Your GPU may not support one or more required OpenGL extensions. Please " + "ensure you have the latest graphics driver. See the log for more details.")); + return false; + } + Core::System& system{Core::System::GetInstance()}; system.SetGPUDebugContext(debug_context); diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 20ff65314..ac3024d8a 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -79,6 +79,7 @@ private: void ConnectWidgetEvents(); void ConnectMenuEvents(); + bool SupportsRequiredGLExtensions(); bool LoadROM(const QString& filename); void BootGame(const QString& filename); void ShutdownGame(); |