summaryrefslogtreecommitdiff
path: root/src/port/Engine.cpp
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2025-03-08 18:36:42 -0600
committerKiritoDv <kiritodev01@gmail.com>2025-03-08 18:36:42 -0600
commitdba0ad2576aea3a31f8987f12205a49461f39aeb (patch)
tree94d683f20ff576d900f5342be75a3af3d0c025bb /src/port/Engine.cpp
parent75a018f9299c3746f8e46b54ccb0f197015c5bcb (diff)
Added install audio buttons
Diffstat (limited to 'src/port/Engine.cpp')
-rw-r--r--src/port/Engine.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp
index 01d111fc..87cd9dd9 100644
--- a/src/port/Engine.cpp
+++ b/src/port/Engine.cpp
@@ -263,18 +263,26 @@ GameEngine::GameEngine() {
context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets);
}
-bool GameEngine::GenAssetFile() {
+bool GameEngine::GenAssetFile(bool exitOnFail) {
auto extractor = new GameExtractor();
if (!extractor->SelectGameFromUI()) {
ShowMessage("Error", "No ROM selected.\n\nExiting...");
- exit(1);
+ if (exitOnFail) {
+ exit(1);
+ } else {
+ return false;
+ }
}
auto game = extractor->ValidateChecksum();
if (!game.has_value()) {
ShowMessage("Unsupported ROM", "The provided ROM is not supported.\n\nCheck the readme for a list of supported versions.");
- exit(1);
+ if (exitOnFail) {
+ exit(1);
+ } else {
+ return false;
+ }
}
ShowMessage(("Found " + game.value()).c_str(), "The extraction process will now begin.\n\nThis may take a few minutes.", SDL_MESSAGEBOX_INFORMATION);