Skip to content

Commit

Permalink
Only pass STLINCOMINGSKIPCOMMANDS matches to 'commandline' function i…
Browse files Browse the repository at this point in the history
…f does NOT contain any slashes
  • Loading branch information
sonic2kk committed Jun 17, 2024
1 parent e706684 commit a70ca92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240617-3 (fix-gamelaunch-steamappscommon)"
PROGVERS="v14.0.20240618-1 (fix-gamelaunch-steamappscommon)"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -26859,8 +26859,11 @@ function main {
if grep -q "update" <<< "$@" || grep -q "^play" <<< "$@" ; then
commandline "$@"
# HACK: Since we check for steamapps/common ($SAC), commands which contain this (such as a one-time run path) will incorrectly get triggered as a game launch
# As a workaround, skip a hardcoded set of commands and pass directly to commandline (i.e. if we have OTR as our first option, pass down to commandline function and run otr)
elif grep -qwE "${STLINCOMINGSKIPCOMMANDS}" <<< "${1}"; then
# As a workaround, skip interpreting a hardcoded set of commands as start parameters and pass directly to commandline (i.e. if we have OTR as our first option, pass down to commandline function and run otr)
#
# We also check to make sure the first argument doesn't contain any slashes (i.e. game start commands' first argument could be a path, so it would contain a slash)
# This allows us to distinguish between '/home/otr' which could be a game launch command, and the 'otr' command
elif grep -qwE "${STLINCOMINGSKIPCOMMANDS}" <<< "${1}" && [[ "${1}" != *"/"* ]]; then
commandline "$@"
else
setGameVars "$@"
Expand Down

0 comments on commit a70ca92

Please sign in to comment.