-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Add --pause-on-exit to simplify launchers #4130
Conversation
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.
yea, this sounds like a sensible idea
Add an option to make scrcpy pause on exit. Three behaviors are possible: - always pause on exit: --pause-on-exit --pause-on-exit=true - never pause on exit: (no option) --pause-on-exit=false - pause when scrcpy returns with an error (a non-zero exit code): --pause-on-exit=if-error This is useful to prevent the terminal window from automatically closing, so that error messages can be read. Refs #3817 <#3817> Refs #3822 <#3822> PR #4130 <#4130>
I refactored to support
|
Add an option to make scrcpy pause on exit. Three behaviors are possible: - always pause on exit: --pause-on-exit --pause-on-exit=true - never pause on exit: (no option) --pause-on-exit=false - pause when scrcpy returns with an error (a non-zero exit code): --pause-on-exit=if-error This is useful to prevent the terminal window from automatically closing, so that error messages can be read. Refs #3817 <#3817> Refs #3822 <#3822> PR #4130 <#4130>
Let's merge it (I thought it was already done). |
scrcpy-console.bat
andscrcpy-console.desktop
must keep the terminal open if scrcpy fails with an error.It was implemented in cmd and shell respectively, which added complexity.
Add an option
--pause-on-exit
in scrcpy to simplify.Three behaviors are possible:
--pause-on-exit
--pause-on-exit=true
--pause-on-exit=false
--pause-on-exit=if-error
One problem to consider is that an error in command line parsing could occur before
--pause-on-error
was taken into account. For that purpose, if getopt did not detect it, this parameter is searched in the wholeargv
array "manually" (without getopt) so that it works in all cases.Refs #3817 #3822