summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2016-09-22 23:06:57 -0400
committerGravatar GitHub2016-09-22 23:06:57 -0400
commit0c8df1046f789c9f965300c54d03004fc0b8721e (patch)
tree7dbc0d9a2d088ad6433d8cfd420cf9a77696f658
parentMerge pull request #2099 from citra-emu/fix-clang-format (diff)
parentqt: shutdown system if error (diff)
downloadyuzu-0c8df1046f789c9f965300c54d03004fc0b8721e.tar.gz
yuzu-0c8df1046f789c9f965300c54d03004fc0b8721e.tar.xz
yuzu-0c8df1046f789c9f965300c54d03004fc0b8721e.zip
Merge pull request #2100 from wwylele/fix-load-assert
Qt: shutdown system if error on loading ROM
-rw-r--r--src/citra_qt/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 82667446b..0c7bedfcf 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -286,7 +286,6 @@ bool GMainWindow::LoadROM(const std::string& filename) {
286 Loader::ResultStatus result = app_loader->Load(); 286 Loader::ResultStatus result = app_loader->Load();
287 if (Loader::ResultStatus::Success != result) { 287 if (Loader::ResultStatus::Success != result) {
288 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 288 LOG_CRITICAL(Frontend, "Failed to load ROM!");
289 System::Shutdown();
290 289
291 switch (result) { 290 switch (result) {
292 case Loader::ResultStatus::ErrorEncrypted: { 291 case Loader::ResultStatus::ErrorEncrypted: {
@@ -326,8 +325,10 @@ void GMainWindow::BootGame(const std::string& filename) {
326 if (!InitializeSystem()) 325 if (!InitializeSystem())
327 return; 326 return;
328 327
329 if (!LoadROM(filename)) 328 if (!LoadROM(filename)) {
329 System::Shutdown();
330 return; 330 return;
331 }
331 332
332 // Create and start the emulation thread 333 // Create and start the emulation thread
333 emu_thread = std::make_unique<EmuThread>(render_window); 334 emu_thread = std::make_unique<EmuThread>(render_window);