Skip to content

Commit

Permalink
Use --pause-on-exit from launchers
Browse files Browse the repository at this point in the history
The terminal opened by scrcpy-console (.bat or .desktop) must not close
if scrcpy terminates with an error, so that error messages can be read.

Refs #3817 <#3817>
Refs #3822 <#3822>
PR #4130 <#4130>
  • Loading branch information
rom1v committed Jun 30, 2023
1 parent a798e00 commit 62178bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/data/scrcpy-console.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
@echo off
scrcpy.exe %*
:: if the exit code is >= 1, then pause
if errorlevel 1 pause
scrcpy.exe --pause-on-exit=if-error %*
2 changes: 1 addition & 1 deletion app/data/scrcpy-console.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Comment=Display and control your Android device
# For some users, the PATH or ADB environment variables are set from the shell
# startup file, like .bashrc or .zshrc… Run an interactive shell to get
# environment correctly initialized.
Exec=/bin/bash --norc --noprofile -i -c "\"\\$SHELL\" -i -c scrcpy || read -p 'Press Enter to quit...'"
Exec=/bin/sh -c "\"\\$SHELL\" -i -c scrcpy --pause-on-exit=if-error"
Icon=scrcpy
Terminal=true
Type=Application
Expand Down

0 comments on commit 62178bf

Please sign in to comment.