mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 14:48:17 -05:00
Merge pull request #2054 from bunnei/scope-context-refactor
frontend: Refactor ScopeAcquireWindowContext out of renderer_opengl.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user