From 0c442db9a729bdd38924d832522ff8fcf393edb3 Mon Sep 17 00:00:00 2001 From: sitton76 <58642183+sitton76@users.noreply.github.com> Date: Sat, 24 May 2025 23:02:20 -0500 Subject: [PATCH 1/2] Added else state to close the game if no rom is found when attempting to extact EU/JP assets. --- src/port/ui/ImguiUI.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 61c3f7fd6..7dd2648dc 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -323,6 +323,9 @@ void DrawSettingsMenu(){ if (GameEngine::GenAssetFile()){ GameEngine::ShowMessage("Success", "Audio assets installed. Changes will be applied on the next startup.", SDL_MESSAGEBOX_INFORMATION); Ship::Context::GetInstance()->GetWindow()->Close(); + } else { + GameEngine::ShowMessage("Failure", "No ROM selected, exiting game...", SDL_MESSAGEBOX_INFORMATION); + Ship::Context::GetInstance()->GetWindow()->Close(); } } } From 67382fe537cd426cc89da6395effdc74e132aa0e Mon Sep 17 00:00:00 2001 From: sitton76 <58642183+sitton76@users.noreply.github.com> Date: Sat, 24 May 2025 23:14:58 -0500 Subject: [PATCH 2/2] Did it properly(confirmed on Linux) --- src/port/ui/ImguiUI.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 7dd2648dc..be909fc6e 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -320,13 +320,10 @@ void DrawSettingsMenu(){ }; } else { if (UIWidgets::Button("Install JP/EU Audio")) { - if (GameEngine::GenAssetFile()){ + if (GameEngine::GenAssetFile(false)){ GameEngine::ShowMessage("Success", "Audio assets installed. Changes will be applied on the next startup.", SDL_MESSAGEBOX_INFORMATION); - Ship::Context::GetInstance()->GetWindow()->Close(); - } else { - GameEngine::ShowMessage("Failure", "No ROM selected, exiting game...", SDL_MESSAGEBOX_INFORMATION); - Ship::Context::GetInstance()->GetWindow()->Close(); } + Ship::Context::GetInstance()->GetWindow()->Close(); } } ImGui::EndMenu();