diff options
Diffstat (limited to 'src/yuzu')
| -rw-r--r-- | src/yuzu/main.cpp | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 2c3e27c2e..fc584637d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -14,6 +14,7 @@  #include "configuration/configure_per_general.h"  #include "core/file_sys/vfs.h"  #include "core/file_sys/vfs_real.h" +#include "core/frontend/scope_acquire_window_context.h"  #include "core/hle/service/acc/profile_manager.h"  #include "core/hle/service/am/applets/applets.h"  #include "core/hle/service/hid/controllers/npad.h" @@ -747,13 +748,15 @@ bool GMainWindow::LoadROM(const QString& filename) {          ShutdownGame();      render_window->InitRenderTarget(); -    render_window->MakeCurrent(); -    if (!gladLoadGL()) { -        QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3 Core!"), -                              tr("Your GPU may not support OpenGL 4.3, or you do not " -                                 "have the latest graphics driver.")); -        return false; +    { +        Core::Frontend::ScopeAcquireWindowContext acquire_context{*render_window}; +        if (!gladLoadGL()) { +            QMessageBox::critical(this, tr("Error while initializing OpenGL 4.3 Core!"), +                                  tr("Your GPU may not support OpenGL 4.3, or you do not " +                                     "have the latest graphics driver.")); +            return false; +        }      }      QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); @@ -794,8 +797,6 @@ bool GMainWindow::LoadROM(const QString& filename) {                 "wiki</a>. This message will not be shown again."));      } -    render_window->DoneCurrent(); -      if (result != Core::System::ResultStatus::Success) {          switch (result) {          case Core::System::ResultStatus::ErrorGetLoader: | 
