summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorTheKoopaKingdom <thekoopakingdom@gmail.com>2017-04-13 07:18:54 +0200
committerTheKoopaKingdom <thekoopakingdom@gmail.com>2017-06-03 00:28:14 +0200
commita8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7 (patch)
tree37a7edc6a27eff75c96117203f48c9f1ec640b97 /src/citra_qt
parentOptimized messages that were repetitive and added ability for core errors to specify more details optionally. (diff)
downloadyuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.gz
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.bz2
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.lz
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.xz
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.zst
yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/bootmanager.h2
-rw-r--r--src/citra_qt/main.cpp16
-rw-r--r--src/citra_qt/main.h3
3 files changed, 10 insertions, 11 deletions
diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h
index b12b37132..4b3a3b3cc 100644
--- a/src/citra_qt/bootmanager.h
+++ b/src/citra_qt/bootmanager.h
@@ -99,7 +99,7 @@ signals:
*/
void DebugModeLeft();
- void ErrorThrown(Core::System::ResultStatus, boost::optional<std::string>);
+ void ErrorThrown(Core::System::ResultStatus, std::string);
};
class GRenderWindow : public QWidget, public EmuWindow {
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 1688e55cd..e3b296188 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -553,10 +553,9 @@ void GMainWindow::OnMenuRecentFile() {
void GMainWindow::OnStartGame() {
emu_thread->SetRunning(true);
qRegisterMetaType<Core::System::ResultStatus>("Core::System::ResultStatus");
- qRegisterMetaType<boost::optional<std::string>>("boost::optional<std::string>");
- connect(emu_thread.get(),
- SIGNAL(ErrorThrown(Core::System::ResultStatus, boost::optional<std::string>)), this,
- SLOT(OnCoreError(Core::System::ResultStatus, boost::optional<std::string>)));
+ qRegisterMetaType<std::string>("std::string");
+ connect(emu_thread.get(), SIGNAL(ErrorThrown(Core::System::ResultStatus, std::string)), this,
+ SLOT(OnCoreError(Core::System::ResultStatus, std::string)));
ui.action_Start->setEnabled(false);
ui.action_Start->setText(tr("Continue"));
@@ -649,8 +648,7 @@ void GMainWindow::UpdateStatusBar() {
emu_frametime_label->setVisible(true);
}
-void GMainWindow::OnCoreError(Core::System::ResultStatus result,
- boost::optional<std::string> details) {
+void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string details) {
QMessageBox::StandardButton answer;
QString status_message;
const QString common_message =
@@ -664,8 +662,8 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result,
switch (result) {
case Core::System::ResultStatus::ErrorSystemFiles: {
QString message = "Citra was unable to locate a 3DS system archive";
- if (details)
- message.append(tr(": %1. ").arg(details.get().c_str()));
+ if (details != std::string())
+ message.append(tr(": %1. ").arg(details.c_str()));
else
message.append(". ");
message.append(common_message);
@@ -693,7 +691,7 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result,
"<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How to "
"Upload the Log File</a>.<br/><br/>Would you like to quit back to the game list?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
- status_message = "Fatal Error encountered.";
+ status_message = "Fatal Error encountered";
break;
}
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index eb2b055f6..952a50974 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -8,6 +8,7 @@
#include <memory>
#include <QMainWindow>
#include <QTimer>
+#include "core/core.h"
#include "ui_main.h"
class Config;
@@ -125,7 +126,7 @@ private slots:
void OnDisplayTitleBars(bool);
void ToggleWindowMode();
void OnCreateGraphicsSurfaceViewer();
- void OnCoreError(Core::System::ResultStatus, boost::optional<std::string>);
+ void OnCoreError(Core::System::ResultStatus, std::string);
private:
void UpdateStatusBar();