From a04d36c5a407ba3d182cbc8ee9695bc39f46ca4f Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 11 Mar 2019 19:39:48 -0400 Subject: main: Switch to AppletManager for frontend --- src/yuzu/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index bdee44b04..c73e78a23 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -8,6 +8,7 @@ #include // VFS includes must be before glad as they will conflict with Windows file api, which uses defines. +#include "applets/error.h" #include "applets/profile_select.h" #include "applets/software_keyboard.h" #include "applets/web_browser.h" @@ -15,6 +16,7 @@ #include "configuration/configure_per_general.h" #include "core/file_sys/vfs.h" #include "core/file_sys/vfs_real.h" +#include "core/frontend/applets/general_frontend.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" @@ -795,9 +797,13 @@ bool GMainWindow::LoadROM(const QString& filename) { system.SetGPUDebugContext(debug_context); - system.SetProfileSelector(std::make_unique(*this)); - system.SetSoftwareKeyboard(std::make_unique(*this)); - system.SetWebBrowser(std::make_unique(*this)); + system.SetAppletFrontendSet({ + std::make_unique(*this), + nullptr, + std::make_unique(*this), + std::make_unique(*this), + std::make_unique(*this), + }); const Core::System::ResultStatus result{system.Load(*render_window, filename.toStdString())}; -- cgit v1.2.3 From 8f8049e846f38d548e975243bc42ce1b09a71ae3 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 11 Mar 2019 19:45:22 -0400 Subject: main: Add GMainWindow hooks for Error display --- src/yuzu/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c73e78a23..e33e3aaaf 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1589,6 +1589,11 @@ void GMainWindow::OnLoadComplete() { loading_screen->OnLoadComplete(); } +void GMainWindow::ErrorDisplayDisplayError(QString body) { + QMessageBox::critical(this, tr("Error Display"), body); + emit ErrorDisplayFinished(); +} + void GMainWindow::OnMenuReportCompatibility() { if (!Settings::values.yuzu_token.empty() && !Settings::values.yuzu_username.empty()) { CompatDB compatdb{this}; -- cgit v1.2.3