diff options
| author | 2017-04-13 01:18:54 -0400 | |
|---|---|---|
| committer | 2017-06-02 18:28:14 -0400 | |
| commit | a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7 (patch) | |
| tree | 37a7edc6a27eff75c96117203f48c9f1ec640b97 /src/citra_qt | |
| parent | Optimized messages that were repetitive and added ability for core errors to ... (diff) | |
| download | yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.gz yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.tar.xz yuzu-a8aef599e02e336f9ecb8d5cfc50aa856ea0a1c7.zip | |
Created a whitelist of system archives to prevent false positives creating dialogs.
Diffstat (limited to 'src/citra_qt')
| -rw-r--r-- | src/citra_qt/bootmanager.h | 2 | ||||
| -rw-r--r-- | src/citra_qt/main.cpp | 16 | ||||
| -rw-r--r-- | src/citra_qt/main.h | 3 |
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: | |||
| 99 | */ | 99 | */ |
| 100 | void DebugModeLeft(); | 100 | void DebugModeLeft(); |
| 101 | 101 | ||
| 102 | void ErrorThrown(Core::System::ResultStatus, boost::optional<std::string>); | 102 | void ErrorThrown(Core::System::ResultStatus, std::string); |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | class GRenderWindow : public QWidget, public EmuWindow { | 105 | 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() { | |||
| 553 | void GMainWindow::OnStartGame() { | 553 | void GMainWindow::OnStartGame() { |
| 554 | emu_thread->SetRunning(true); | 554 | emu_thread->SetRunning(true); |
| 555 | qRegisterMetaType<Core::System::ResultStatus>("Core::System::ResultStatus"); | 555 | qRegisterMetaType<Core::System::ResultStatus>("Core::System::ResultStatus"); |
| 556 | qRegisterMetaType<boost::optional<std::string>>("boost::optional<std::string>"); | 556 | qRegisterMetaType<std::string>("std::string"); |
| 557 | connect(emu_thread.get(), | 557 | connect(emu_thread.get(), SIGNAL(ErrorThrown(Core::System::ResultStatus, std::string)), this, |
| 558 | SIGNAL(ErrorThrown(Core::System::ResultStatus, boost::optional<std::string>)), this, | 558 | SLOT(OnCoreError(Core::System::ResultStatus, std::string))); |
| 559 | SLOT(OnCoreError(Core::System::ResultStatus, boost::optional<std::string>))); | ||
| 560 | 559 | ||
| 561 | ui.action_Start->setEnabled(false); | 560 | ui.action_Start->setEnabled(false); |
| 562 | ui.action_Start->setText(tr("Continue")); | 561 | ui.action_Start->setText(tr("Continue")); |
| @@ -649,8 +648,7 @@ void GMainWindow::UpdateStatusBar() { | |||
| 649 | emu_frametime_label->setVisible(true); | 648 | emu_frametime_label->setVisible(true); |
| 650 | } | 649 | } |
| 651 | 650 | ||
| 652 | void GMainWindow::OnCoreError(Core::System::ResultStatus result, | 651 | void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string details) { |
| 653 | boost::optional<std::string> details) { | ||
| 654 | QMessageBox::StandardButton answer; | 652 | QMessageBox::StandardButton answer; |
| 655 | QString status_message; | 653 | QString status_message; |
| 656 | const QString common_message = | 654 | const QString common_message = |
| @@ -664,8 +662,8 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result, | |||
| 664 | switch (result) { | 662 | switch (result) { |
| 665 | case Core::System::ResultStatus::ErrorSystemFiles: { | 663 | case Core::System::ResultStatus::ErrorSystemFiles: { |
| 666 | QString message = "Citra was unable to locate a 3DS system archive"; | 664 | QString message = "Citra was unable to locate a 3DS system archive"; |
| 667 | if (details) | 665 | if (details != std::string()) |
| 668 | message.append(tr(": %1. ").arg(details.get().c_str())); | 666 | message.append(tr(": %1. ").arg(details.c_str())); |
| 669 | else | 667 | else |
| 670 | message.append(". "); | 668 | message.append(". "); |
| 671 | message.append(common_message); | 669 | message.append(common_message); |
| @@ -693,7 +691,7 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result, | |||
| 693 | "<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How to " | 691 | "<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How to " |
| 694 | "Upload the Log File</a>.<br/><br/>Would you like to quit back to the game list?"), | 692 | "Upload the Log File</a>.<br/><br/>Would you like to quit back to the game list?"), |
| 695 | QMessageBox::Yes | QMessageBox::No, QMessageBox::No); | 693 | QMessageBox::Yes | QMessageBox::No, QMessageBox::No); |
| 696 | status_message = "Fatal Error encountered."; | 694 | status_message = "Fatal Error encountered"; |
| 697 | break; | 695 | break; |
| 698 | } | 696 | } |
| 699 | 697 | ||
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 @@ | |||
| 8 | #include <memory> | 8 | #include <memory> |
| 9 | #include <QMainWindow> | 9 | #include <QMainWindow> |
| 10 | #include <QTimer> | 10 | #include <QTimer> |
| 11 | #include "core/core.h" | ||
| 11 | #include "ui_main.h" | 12 | #include "ui_main.h" |
| 12 | 13 | ||
| 13 | class Config; | 14 | class Config; |
| @@ -125,7 +126,7 @@ private slots: | |||
| 125 | void OnDisplayTitleBars(bool); | 126 | void OnDisplayTitleBars(bool); |
| 126 | void ToggleWindowMode(); | 127 | void ToggleWindowMode(); |
| 127 | void OnCreateGraphicsSurfaceViewer(); | 128 | void OnCreateGraphicsSurfaceViewer(); |
| 128 | void OnCoreError(Core::System::ResultStatus, boost::optional<std::string>); | 129 | void OnCoreError(Core::System::ResultStatus, std::string); |
| 129 | 130 | ||
| 130 | private: | 131 | private: |
| 131 | void UpdateStatusBar(); | 132 | void UpdateStatusBar(); |