diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index fa02815f..f8f8ee66 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -863,12 +863,14 @@ static void launcher_info(const char* title, const std::string& msg) { static std::string s_picker_game_name = "PSXRecomp"; static bool pick_runtime_file(const char* title, const char* filter, - std::filesystem::path& out) { + std::filesystem::path& out, const char* cli_flag) { // Headless: never open an interactive file dialog (it blocks). Fail the // resolve so boot aborts cleanly with the stderr message the caller printed. if (g_headless) { - std::fprintf(stderr, "psxrecomp: headless — cannot prompt for '%s'; " - "supply it via game.toml / --disc / --bios.\n", title); + std::fprintf(stderr, + "psxrecomp: headless — cannot prompt for '%s'.\n" + " Supply it on the command line: %s (or set it in game.toml).\n", + title, cli_flag); return false; } #ifdef _WIN32 @@ -891,7 +893,16 @@ static bool pick_runtime_file(const char* title, const char* filter, #else (void)filter; (void)out; - std::fprintf(stderr, "psxrecomp: %s requires a command-line path on this platform.\n", title); + // No native GUI file picker on this platform (macOS/Linux): the file must be + // named on the command line. Tell the user the exact flag + a full example + // instead of a dead-end "requires a command-line path". + std::fprintf(stderr, + "psxrecomp: no graphical file picker on this platform — '%s'\n" + " must be supplied on the command line: %s \n" + " Example: ./ --game game.toml " + "--bios /path/to/SCPH1001.BIN --disc /path/to/game.cue\n" + " (or set the path in game.toml). See the game's README, \"Building From Source\".\n", + title, cli_flag); return false; #endif } @@ -1059,7 +1070,7 @@ static std::filesystem::path resolve_bios_for_runtime(const char* requested, if (!pick_runtime_file( bios_title.c_str(), "PlayStation BIOS (*.bin)\0*.bin\0All Files (*.*)\0*.*\0", - picked)) { + picked, "--bios")) { return {}; } if (validate_bios_for_launch(picked)) { @@ -1118,7 +1129,7 @@ static std::filesystem::path resolve_disc_for_runtime(const std::filesystem::pat if (!pick_runtime_file( disc_title.c_str(), "PS1 Disc Images (*.cue;*.bin;*.iso)\0*.cue;*.bin;*.iso\0All Files (*.*)\0*.*\0", - picked)) { + picked, "--disc")) { return {}; } picked = normalize_disc_path_for_launch(picked);