aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyani <achrafreyani99@gmail.com>2026-11-03 14:41:59 +0900
committerGitHub <noreply@github.com>2026-11-03 14:41:59 +0900
commit171f9854b8ff99d8ed99d5911e9ca8db683cb781 (patch)
treeb8ee1b2ada511c7d3712989950a01b0f2d6c6251
parentcee9ef20fdf3dfb802fb7772103aa99e8aa385f8 (diff)
parent75fdcbdf2b0f30d2605ddf77eaa53550ac4c29f9 (diff)
Merge pull request #377 from Djihads80/eglantine/cli-help-version-exit
cli: exit successfully for --help and --version
-rw-r--r--src/yuzu_cmd/yuzu.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 6342c5d353..86530ea798 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -349,6 +349,12 @@ extern "C" SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
return PackNup(*lp.pack_nup_source, lp.filepath) ? SDL_APP_SUCCESS : SDL_APP_FAILURE;
}
+ // Informational options already printed by ApplyLaunchParams; do not treat a
+ // missing ROM as a failure when the user only asked for help or version.
+ if (lp.print_help || lp.print_version) {
+ return SDL_APP_SUCCESS;
+ }
+
if (lp.filepath.empty()) {
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
return SDL_APP_FAILURE;