Skip to content

Commit

Permalink
Added option to keep the game open after the game closed
Browse files Browse the repository at this point in the history
  • Loading branch information
frostworx committed Oct 13, 2022
1 parent 1939475 commit 97d9b6d
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lang/chinese.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/dutch.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
4 changes: 3 additions & 1 deletion lang/english.txt
Expand Up @@ -944,4 +944,6 @@ GUI_WAITFORCUSTOMCMD="Wait for custom command"
DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program before continuing with the game launch. 1 is only wait for the custom program pid"
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/englishUK.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/french.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/german.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Warte X Sekunden nach dem Start des custom commands mit d
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="steamtinkerlaunch geöffnet lassen"
DESC_KEEPSTLOPEN="steamtinkerlaunch nach Spielende geöffnet lassen"
2 changes: 2 additions & 0 deletions lang/italian.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/polish.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Czekaj X sekund po rozpoczęciu własnego programu przed
GUI_USEOBSCAP="Włącz obs-gamecapture"
DESC_USEOBSCAP="Rozpocznij grę przez obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
2 changes: 2 additions & 0 deletions lang/russian.txt
Expand Up @@ -945,3 +945,5 @@ DESC_WAITFORCUSTOMCMD="Wait X seconds after having started the custom program be
GUI_USEOBSCAP="Enable obs-gamecapture"
DESC_USEOBSCAP="Start the game through obs-gamecapture"
TRAY_OPENISSUE="Open an Issue"
GUI_KEEPSTLOPEN="Keep steamtinkerlaunch open"
DESC_KEEPSTLOPEN="Keep steamtinkerlaunch open after game exit"
17 changes: 13 additions & 4 deletions steamtinkerlaunch
Expand Up @@ -6,7 +6,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v11.12.20221012"
PROGVERS="v11.12.20221013"
PROGCMD="${0##*/}"
SHOSTL="stl"
GHURL="https://github.com"
Expand Down Expand Up @@ -2620,6 +2620,7 @@ function setDefaultCfgValues {
}

function setDefaultCfgValuesdefault_template {
if [ -z "$KEEPSTLOPEN" ] ; then KEEPSTLOPEN="0"; fi
if [ -z "$USESLR" ] ; then USESLR="1"; fi
if [ -z "$FORCESLR" ] ; then FORCESLR="0"; fi
if [ -z "$USEREAP" ] ; then USEREAP="1"; fi
Expand Down Expand Up @@ -3095,6 +3096,8 @@ function saveCfg {
{
echo "## config Version: $PROGVERS"
echo "##########################"
echo "## $DESC_KEEPSTLOPEN"
echo "KEEPSTLOPEN=\"$KEEPSTLOPEN\""
echo "## $DESC_USESLR"
echo "USESLR=\"$USESLR\""
echo "## $DESC_FORCESLR"
Expand Down Expand Up @@ -4809,6 +4812,7 @@ function AllSettingsEntriesDummyFunction {
--field=" $GUI_SGDBNSFW!$DESC_SGDBNSFW ('SGDBNSFW')":CBE "$(cleanDropDown "${SGDBNSFW/#-/ -}" "any!false!true")" `#CAT_SteamGridDB` `#MENU_GLOBAL` \
--field=" $GUI_SGDBHUMOR!$DESC_SGDBHUMOR ('SGDBHUMOR')":CBE "$(cleanDropDown "${SGDBHUMOR/#-/ -}" "any!false!true")" `#CAT_SteamGridDB` `#MENU_GLOBAL` \
--field="$(spanFont "$GUI_OPTSMISC" "H")":LBL "SKIP" `#CAT_Misc` `#HEAD_Misc` `#MENU_GAME` `#MENU_GLOBAL` \
--field=" $GUI_KEEPSTLOPEN!$DESC_KEEPSTLOPEN ('KEEPSTLOPEN')":CHK "${KEEPSTLOPEN/#-/ -}" `#CAT_Misc` `#SUB_Checkbox` `#MENU_GAME` \
--field=" $GUI_USECUSTOMCMD!$DESC_USECUSTOMCMD ('USECUSTOMCMD')":CHK "${USECUSTOMCMD/#-/ -}" `#CAT_Misc` `#SUB_Checkbox` `#MENU_GAME` \
--field=" $GUI_CUSTOMCMD!$DESC_CUSTOMCMD $GUI_ECHOPLAC ('CUSTOMCMD')":FL "${OPCUSTPATH/#-/ -}" `#CAT_Misc` `#MENU_GAME` \
--field=" $GUI_CUSTOMCMD_ARGS!$DESC_CUSTOMCMD_ARGS ('CUSTOMCMD_ARGS')" "${CUSTOMCMD_ARGS/#-/ -}" `#CAT_Misc` `#MENU_GAME` \
Expand Down Expand Up @@ -15042,9 +15046,14 @@ function prepareLaunch {
writelog "INFO" "${FUNCNAME[0]} - launchSteamGame:"
launchSteamGame

# GAME ENDED - Closing:
writelog "STOP" "######### CLEANUP #########"
closeSTL "######### DONE - $PROGNAME $PROGVERS #########"
if [ "$KEEPSTLOPEN" -eq 1 ]; then
writelog "INFO" "${FUNCNAME[0]} - KEEPSTLOPEN is enabled - re-opening the $PROGNAME menu"
prepareLaunch X
else
# GAME ENDED - Closing:
writelog "STOP" "######### CLEANUP #########"
closeSTL "######### DONE - $PROGNAME $PROGVERS #########"
fi
}

function switchProton {
Expand Down

0 comments on commit 97d9b6d

Please sign in to comment.