diff options
| author | 2017-03-08 20:21:31 -0500 | |
|---|---|---|
| committer | 2017-06-02 18:28:14 -0400 | |
| commit | 37bec598ea28662462dcaab65d5abd6db8372dbc (patch) | |
| tree | e1aa020f3884d601182155791d9c474df04fd133 /src/citra_qt/main.cpp | |
| parent | Added system for handling core errors in citra-qt. (diff) | |
| download | yuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.tar.gz yuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.tar.xz yuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.zip | |
Made some changes from review comments:
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review).
- Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore.
- Made dialog messages more clear.
- Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic.
- Cleaned up some other stuff.
Diffstat (limited to 'src/citra_qt/main.cpp')
| -rw-r--r-- | src/citra_qt/main.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index e24c48e90..cc38cfc0e 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -300,7 +300,7 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 300 | render_window->MakeCurrent(); | 300 | render_window->MakeCurrent(); |
| 301 | 301 | ||
| 302 | if (!gladLoadGL()) { | 302 | if (!gladLoadGL()) { |
| 303 | QMessageBox::critical(this, tr("Error while starting Citra!"), | 303 | QMessageBox::critical(this, tr("Error while initializing OpenGL 3.3 Core!"), |
| 304 | tr("Your GPU may not support OpenGL 3.3, or you do not" | 304 | tr("Your GPU may not support OpenGL 3.3, or you do not" |
| 305 | "have the latest graphics driver.")); | 305 | "have the latest graphics driver.")); |
| 306 | return false; | 306 | return false; |
| @@ -329,7 +329,7 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 329 | QMessageBox::critical( | 329 | QMessageBox::critical( |
| 330 | this, tr("Error while loading ROM!"), | 330 | this, tr("Error while loading ROM!"), |
| 331 | tr("The game that you are trying to load must be decrypted before being used with " | 331 | tr("The game that you are trying to load must be decrypted before being used with " |
| 332 | "Citra.<br/><br/>" | 332 | "Citra. A real 3DS is required.<br/><br/>" |
| 333 | "For more information on dumping and decrypting games, please see the following " | 333 | "For more information on dumping and decrypting games, please see the following " |
| 334 | "wiki pages: <ul>" | 334 | "wiki pages: <ul>" |
| 335 | "<li><a href='https://citra-emu.org/wiki/Dumping-Game-Cartridges/'>Dumping Game " | 335 | "<li><a href='https://citra-emu.org/wiki/Dumping-Game-Cartridges/'>Dumping Game " |
| @@ -344,10 +344,17 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 344 | tr("The ROM format is not supported.")); | 344 | tr("The ROM format is not supported.")); |
| 345 | break; | 345 | break; |
| 346 | 346 | ||
| 347 | case Core::System::ResultStatus::ErrorOpenGL: | 347 | case Core::System::ResultStatus::ErrorVideoCore: |
| 348 | QMessageBox::critical(this, tr("Error while loading OpenGL!"), | 348 | QMessageBox::critical( |
| 349 | tr("Your GPU may not support OpenGL 3.3, or you do not " | 349 | this, tr("An error occured in the video core."), |
| 350 | "have the latest graphics driver.")); | 350 | tr("Citra has encountered an error while running the video core, please see the " |
| 351 | "log for more details." | ||
| 352 | "For more information on accessing the log, please see the following page: " | ||
| 353 | "<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How " | ||
| 354 | "to " | ||
| 355 | "Upload the Log File</a>." | ||
| 356 | "Ensure that you have the latest graphics drivers for your GPU.")); | ||
| 357 | |||
| 351 | break; | 358 | break; |
| 352 | 359 | ||
| 353 | default: | 360 | default: |
| @@ -632,9 +639,6 @@ void GMainWindow::UpdateStatusBar() { | |||
| 632 | } | 639 | } |
| 633 | 640 | ||
| 634 | void GMainWindow::OnCoreError(Core::System::ResultStatus result) { | 641 | void GMainWindow::OnCoreError(Core::System::ResultStatus result) { |
| 635 | // Waiting for the dialog to be closed before shutting down causes a segfault, maybe because of | ||
| 636 | // the profiler | ||
| 637 | ShutdownGame(); | ||
| 638 | switch (result) { | 642 | switch (result) { |
| 639 | case Core::System::ResultStatus::ErrorSystemFiles: | 643 | case Core::System::ResultStatus::ErrorSystemFiles: |
| 640 | QMessageBox::critical( | 644 | QMessageBox::critical( |
| @@ -664,13 +668,13 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result) { | |||
| 664 | "."); | 668 | "."); |
| 665 | break; | 669 | break; |
| 666 | 670 | ||
| 667 | case Core::System::ResultStatus::ErrorUnknown: | 671 | default: |
| 668 | QMessageBox::critical( | 672 | QMessageBox::critical( |
| 669 | this, "Fatal Error", | 673 | this, "Fatal Error", |
| 670 | "Citra has encountered a fatal error, please see the log for more details."); | 674 | "Citra has encountered a fatal error, please see the log for more details. " |
| 671 | break; | 675 | "For more information on accessing the log, please see the following page: " |
| 672 | 676 | "<a href='https://community.citra-emu.org/t/how-to-upload-the-log-file/296'>How to " | |
| 673 | default: | 677 | "Upload the Log File</a>."); |
| 674 | break; | 678 | break; |
| 675 | } | 679 | } |
| 676 | } | 680 | } |
| @@ -679,9 +683,10 @@ bool GMainWindow::ConfirmClose() { | |||
| 679 | if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) | 683 | if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) |
| 680 | return true; | 684 | return true; |
| 681 | 685 | ||
| 682 | return QMessageBox::question(this, tr("Citra"), tr("Are you sure you want to close Citra?"), | 686 | auto answer = |
| 683 | QMessageBox::Yes | QMessageBox::No, | 687 | QMessageBox::question(this, tr("Citra"), tr("Are you sure you want to close Citra?"), |
| 684 | QMessageBox::No) != QMessageBox::No; | 688 | QMessageBox::Yes | QMessageBox::No, QMessageBox::No); |
| 689 | return answer != QMessageBox::No; | ||
| 685 | } | 690 | } |
| 686 | 691 | ||
| 687 | void GMainWindow::closeEvent(QCloseEvent* event) { | 692 | void GMainWindow::closeEvent(QCloseEvent* event) { |