Update --help text

This commit is contained in:
kalaposfos13 2024-11-10 20:44:15 +01:00
parent beea900d6f
commit 37fb5dce96
2 changed files with 15 additions and 10 deletions

View File

@ -31,6 +31,8 @@ int main(int argc, char* argv[]) {
"Options:\n" "Options:\n"
" -g, --game <path|ID> Specify game path to launch\n" " -g, --game <path|ID> Specify game path to launch\n"
" -p, --patch <patch_file> Apply specified patch file\n" " -p, --patch <patch_file> Apply specified patch file\n"
" -f, --fullscreen <true|false> Specify window initial fullscreen "
"state. Does not overwrite the config file."
" -h, --help Display this help message\n"; " -h, --help Display this help message\n";
exit(0); exit(0);
}}, }},

View File

@ -37,13 +37,15 @@ int main(int argc, char* argv[]) {
std::unordered_map<std::string, std::function<void(int&)>> arg_map = { std::unordered_map<std::string, std::function<void(int&)>> arg_map = {
{"-h", {"-h",
[&](int&) { [&](int&) {
std::cout << "Usage: emulator [options]\n" std::cout << "Usage: shadps4 [options]\n"
"Options:\n" "Options:\n"
" No arguments: Opens the GUI.\n" " No arguments: Opens the GUI.\n"
" -g, --game <path|ID> Specify <eboot.bin or elf path> or <game " " -g, --game <path|ID> Specify <eboot.bin or elf path> or "
"ID (CUSAXXXXX)> to launch\n" "<game ID (CUSAXXXXX)> to launch\n"
" -p, --patch <patch_file> Apply specified patch file\n" " -p, --patch <patch_file> Apply specified patch file\n"
" -s, --show-gui Show the GUI\n" " -s, --show-gui Show the GUI\n"
" -f, --fullscreen <true|false> Specify window initial fullscreen "
"state. Does not overwrite the config file."
" -h, --help Display this help message\n"; " -h, --help Display this help message\n";
exit(0); exit(0);
}}, }},
@ -77,7 +79,8 @@ int main(int argc, char* argv[]) {
{"-f", {"-f",
[&](int& i) { [&](int& i) {
if (++i >= argc) { if (++i >= argc) {
std::cerr << "Error: Missing argument for -f/--fullscreen\n"; std::cerr
<< "Error: Invalid argument for -f/--fullscreen. Use 'true' or 'false'.\n";
exit(1); exit(1);
} }
std::string f_param(argv[i]); std::string f_param(argv[i]);