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/main.cpp | |
| 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/main.cpp')
| -rw-r--r-- | src/citra_qt/main.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
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 | ||