Skip to content

Commit

Permalink
Some minor tweaks
Browse files Browse the repository at this point in the history
Tweak the WARN message in `restoreOrgVars`
Remove unnecessary comment from `gameStart`
Kate also decided to clean up some whitespace
  • Loading branch information
HanPrower committed Sep 3, 2024
1 parent a985cfb commit c08cdd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7208,7 +7208,7 @@ function extProtonRun {
# Hopefully unsetting is safe and doesn't mean places that need the SLR will lose it from this 'unset'
if [ "$EXTPROTUSESLR" -eq 1 ]; then
writelog "INFO" "${FUNCNAME[0]} - EXTPROTUSESLR is '$EXTPROTUSESLR' -- Attempting to find and use SLR with extProtonRun"

unset "${SLRCMD[@]}"
setSLRReap
fi
Expand Down Expand Up @@ -7782,7 +7782,7 @@ function getGameWindowPID {

return
fi

MAXWAIT=20
COUNTER=0
TESTPID="$NON"
Expand Down Expand Up @@ -12931,7 +12931,7 @@ function launchCustomProg {
writelog "INFO" "${FUNCNAME[0]} - FORK_CUSTOMCMD is set to 1 - forking the custom program in background and continue"
extProtonRun "FC" "$LACO" "$CUSTOMCMD_ARGS" "" "${CUSTOMCMD_USESLR}"
elif [ "$ONLY_CUSTOMCMD" -eq 1 ] && [ -n "${FINALOUTCMD[*]}" ]; then
writelog "INFO" "${FUNCNAME[0]} - ONLY_CUSTOMCMD is set to 1 and we have some arguments in FINALOUTCMD - passing to extProtonRun to build a valid start command"
writelog "INFO" "${FUNCNAME[0]} - ONLY_CUSTOMCMD is set to 1 and we have some arguments in FINALOUTCMD - passing to extProtonRun to build a valid start command"
extProtonRun "R" "$LACO" "$CUSTOMCMD_ARGS" "$FINALOUTCMD" "${CUSTOMCMD_USESLR}" # extProtonRun will handle adding the FINALOUTCMD args to
else
extProtonRun "RC" "$LACO" "$CUSTOMCMD_ARGS" "" "${CUSTOMCMD_USESLR}"
Expand Down Expand Up @@ -12977,7 +12977,7 @@ function launchCustomProg {

writelog "INFO" "${FUNCNAME[0]} - Steam Linux Runtime enabled, attempting to fetch Steam Linux Runtime for native Custom Command"
# "2" is the FORCESLRTYPE, meaning we want to force to get the native SLR -- We do this in case we are trying to launch a native custom command with a Proton title
# In this case, setSLRReap is going to have the Proton SLR vars set from the game launch, so we need to force it here to use the native SLR
# In this case, setSLRReap is going to have the Proton SLR vars set from the game launch, so we need to force it here to use the native SLR
setNonGameSLRReap "2"
fi

Expand Down Expand Up @@ -17819,7 +17819,7 @@ function prepareMO2 {
}

function createMO2SilentModeExeProfilesList {
# Get all of the ModOrganizer 2 executables launch configurations in the instance's INI
# Get all of the ModOrganizer 2 executables launch configurations in the instance's INI
# The user can use this to override which 'moshortcut://' is launched in Silent Mode
MO2SILENTMODEEXEPROFILES="$NON"
MO2GAMES="$GLOBALMISCDIR/mo2games.txt"
Expand Down Expand Up @@ -20268,7 +20268,7 @@ function startGame {
writelog "INFO" "${FUNCNAME[0]} - ## STL LAUNCH COMMAND: '${RUNCMD[*]}'"
writelog "INFO" "${FUNCNAME[0]} - ## GAMESTART HERE ###"

restoreOrgVars # restore original LC_ and friends for the game as long as not set in custom-vars
restoreOrgVars

GRUNLOG="$STLGLLOGDIRID/${AID}.log"
if [ "$ISORIGIN" -eq 1 ]; then
Expand Down Expand Up @@ -25393,7 +25393,7 @@ function restoreOrgVars {

# Check if the envvar has been defined in a custom-vars conf file, if so don't restore it and continue
if grep -q "^${RESTOREVAR}" "$GLOBCUSTVARS" || grep -q "^${RESTOREVAR}" "$GAMECUSTVARS"; then
writelog "WARN" "${FUNCNAME[0]} - Not restoring '${RESTOREVAR}' to original value as it is defined in a custom-vars conf file"
writelog "WARN" "${FUNCNAME[0]} - Not restoring '${RESTOREVAR}' to original value as it is defined in a custom-vars conf file. This may potentially cause issues."

continue
fi
Expand Down

0 comments on commit c08cdd3

Please sign in to comment.