mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-14 06:45:17 +00:00
Merge pull request #2100 from wwylele/fix-load-assert
Qt: shutdown system if error on loading ROM
This commit is contained in:
commit
0c8df1046f
|
@ -286,7 +286,6 @@ bool GMainWindow::LoadROM(const std::string& filename) {
|
||||||
Loader::ResultStatus result = app_loader->Load();
|
Loader::ResultStatus result = app_loader->Load();
|
||||||
if (Loader::ResultStatus::Success != result) {
|
if (Loader::ResultStatus::Success != result) {
|
||||||
LOG_CRITICAL(Frontend, "Failed to load ROM!");
|
LOG_CRITICAL(Frontend, "Failed to load ROM!");
|
||||||
System::Shutdown();
|
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case Loader::ResultStatus::ErrorEncrypted: {
|
case Loader::ResultStatus::ErrorEncrypted: {
|
||||||
|
@ -326,8 +325,10 @@ void GMainWindow::BootGame(const std::string& filename) {
|
||||||
if (!InitializeSystem())
|
if (!InitializeSystem())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!LoadROM(filename))
|
if (!LoadROM(filename)) {
|
||||||
|
System::Shutdown();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Create and start the emulation thread
|
// Create and start the emulation thread
|
||||||
emu_thread = std::make_unique<EmuThread>(render_window);
|
emu_thread = std::make_unique<EmuThread>(render_window);
|
||||||
|
|
Loading…
Reference in a new issue