-
-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Add argument to pass an argument to the game #2135
base: main
Are you sure you want to change the base?
Conversation
There is a common pattern used in Linux, that everything after a |
Now the above example looks like this: |
It should not have the double quote though. But that seem hard to do. |
The quotes are intentional, the game expects one string argument with all the options in it. If there weren't quotes, they would be split into multiple arguments, of which the game will ignore all but the first one. |
I suggest updating the description of the PR. |
Does Knack actually accept a custom resolution as an argument and use it ? Is there any documented games launch arguments ? |
This doesn't work with
If you use
|
@ngoquang2708 The above errors have been fixed. |
src/main.cpp
Outdated
@@ -37,6 +38,10 @@ int main(int argc, char* argv[]) { | |||
std::cout << "Usage: shadps4 [options] <elf or eboot.bin path>\n" | |||
"Options:\n" | |||
" -g, --game <path|ID> Specify game path to launch\n" | |||
" -ga, --game-with-arg <path|ID> <arg>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed anymore.
Look in to this, I think we can do it better by extract CLI parsing logic to a common file share between Qt and CLI versions. In the future, we can easily port it to use boost 's |
Syntax:
shadps4 <options> <game> -- <game arg 1> <game arg 2> ...
Works for both SDL and Qt versions, but there's no GUI for it.
You can pass up to 32 arguments to a game (untested)
Tested with Knack 2 (needs only one argument):
./build/shadps4 CUSA08014 -- "-w=10 -cursoroff -region=a -2160p"