summaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-24 22:53:21 -0400
committerGitHub <noreply@github.com>2019-04-24 22:53:21 -0400
commit53f746fa9a41647d69cdbd52de7e49de4acbfe6b (patch)
tree7b62619ffedc3012d131c63c12451779d22e8fd9 /src/yuzu/main.cpp
parent05928690761f25b3540046e942afcec268b3fbbb (diff)
parent2adb226b26f7f4b9a2c5cd4ea056479d7b5c1527 (diff)
Merge pull request #2228 from DarkLordZach/applet-manager-p1
applets: Add AppletManager and implement PhotoViewer and Error applets
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index bdee44b04..e33e3aaaf 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -8,6 +8,7 @@
#include <thread>
// 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<QtProfileSelector>(*this));
- system.SetSoftwareKeyboard(std::make_unique<QtSoftwareKeyboard>(*this));
- system.SetWebBrowser(std::make_unique<QtWebBrowser>(*this));
+ system.SetAppletFrontendSet({
+ std::make_unique<QtErrorDisplay>(*this),
+ nullptr,
+ std::make_unique<QtProfileSelector>(*this),
+ std::make_unique<QtSoftwareKeyboard>(*this),
+ std::make_unique<QtWebBrowser>(*this),
+ });
const Core::System::ResultStatus result{system.Load(*render_window, filename.toStdString())};
@@ -1583,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};