Explorar o código

Merge pull request #2100 from wwylele/fix-load-assert

Qt: shutdown system if error on loading ROM
bunnei %!s(int64=9) %!d(string=hai) anos
pai
achega
0c8df1046f
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/citra_qt/main.cpp

+ 3 - 2
src/citra_qt/main.cpp

@@ -286,7 +286,6 @@ bool GMainWindow::LoadROM(const std::string& filename) {
     Loader::ResultStatus result = app_loader->Load();
     if (Loader::ResultStatus::Success != result) {
         LOG_CRITICAL(Frontend, "Failed to load ROM!");
-        System::Shutdown();
 
         switch (result) {
         case Loader::ResultStatus::ErrorEncrypted: {
@@ -326,8 +325,10 @@ void GMainWindow::BootGame(const std::string& filename) {
     if (!InitializeSystem())
         return;
 
-    if (!LoadROM(filename))
+    if (!LoadROM(filename)) {
+        System::Shutdown();
         return;
+    }
 
     // Create and start the emulation thread
     emu_thread = std::make_unique<EmuThread>(render_window);