mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 11:35:20 +00:00
fix parsing of steamappid inside ulwgl ids, pass '0' as steamappid for games with no steam version (https://github.com/ValveSoftware/steam-runtime/issues/287#issuecomment-831877852)
This commit is contained in:
parent
608eeb0344
commit
c3c016bcdc
13
ULWGL
13
ULWGL
@ -177,18 +177,7 @@ if [ -n "$log_to_file" ]; then
|
||||
if [ -z "${STEAM_COMPAT_APP_ID-}" ] && [ -z "${SteamAppId-}" ]; then
|
||||
app="non-steam-game"
|
||||
else
|
||||
# for non-steam games ULWGL passes the ULWGL_ID as STEAM_COMPAT_APP_ID and SteamAppId
|
||||
# which means it won't be null and will fail the above check, making this script think
|
||||
# it's a steam game. We need to perform a numerical check here
|
||||
# to validate a non-numeric ID is set as a non-steam game.
|
||||
numcheck='^[0-9]+$'
|
||||
# if is numeric, assign as steam app id.
|
||||
if [[ $(cat ${STEAM_COMPAT_APP_ID-}) =~ $numcheck ]] || [[ $(cat ${SteamAppId-}) =~ $numcheck ]]; then
|
||||
app="app${STEAM_COMPAT_APP_ID-${SteamAppId}}"
|
||||
else
|
||||
# if not numeric, assign as non-steam game.
|
||||
app="non-steam-game"
|
||||
fi
|
||||
app="app${STEAM_COMPAT_APP_ID-${SteamAppId}}"
|
||||
fi
|
||||
|
||||
log_filename="slr-${app}-t$(date +'%Y%m%dT%H%M%S').log"
|
||||
|
@ -17,10 +17,10 @@ if [[ $WINEPREFIX ]]; then
|
||||
fi
|
||||
export PROTONPATH="$PROTONPATH"
|
||||
export ULWGL_ID="$GAMEID"
|
||||
export STEAM_COMPAT_APP_ID="$GAMEID"
|
||||
export STEAM_COMPAT_APP_ID="0"
|
||||
numcheck='^[0-9]+$'
|
||||
if [[ $(cat $ULWGL_ID | cut -d "-" -f 2) =~ $numcheck ]]; then
|
||||
export STEAM_COMPAT_APP_ID=$(cat $ULWGL_ID | cut -d "-" -f 2)
|
||||
if [[ $(echo $ULWGL_ID | cut -d "-" -f 2) =~ $numcheck ]]; then
|
||||
export STEAM_COMPAT_APP_ID=$(echo $ULWGL_ID | cut -d "-" -f 2)
|
||||
fi
|
||||
export SteamAppId="$STEAM_COMPAT_APP_ID"
|
||||
export SteamGameId="$STEAM_COMPAT_APP_ID"
|
||||
|
Loading…
x
Reference in New Issue
Block a user