mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 19:45: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
|
if [ -z "${STEAM_COMPAT_APP_ID-}" ] && [ -z "${SteamAppId-}" ]; then
|
||||||
app="non-steam-game"
|
app="non-steam-game"
|
||||||
else
|
else
|
||||||
# for non-steam games ULWGL passes the ULWGL_ID as STEAM_COMPAT_APP_ID and SteamAppId
|
app="app${STEAM_COMPAT_APP_ID-${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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log_filename="slr-${app}-t$(date +'%Y%m%dT%H%M%S').log"
|
log_filename="slr-${app}-t$(date +'%Y%m%dT%H%M%S').log"
|
||||||
|
@ -17,10 +17,10 @@ if [[ $WINEPREFIX ]]; then
|
|||||||
fi
|
fi
|
||||||
export PROTONPATH="$PROTONPATH"
|
export PROTONPATH="$PROTONPATH"
|
||||||
export ULWGL_ID="$GAMEID"
|
export ULWGL_ID="$GAMEID"
|
||||||
export STEAM_COMPAT_APP_ID="$GAMEID"
|
export STEAM_COMPAT_APP_ID="0"
|
||||||
numcheck='^[0-9]+$'
|
numcheck='^[0-9]+$'
|
||||||
if [[ $(cat $ULWGL_ID | cut -d "-" -f 2) =~ $numcheck ]]; then
|
if [[ $(echo $ULWGL_ID | cut -d "-" -f 2) =~ $numcheck ]]; then
|
||||||
export STEAM_COMPAT_APP_ID=$(cat $ULWGL_ID | cut -d "-" -f 2)
|
export STEAM_COMPAT_APP_ID=$(echo $ULWGL_ID | cut -d "-" -f 2)
|
||||||
fi
|
fi
|
||||||
export SteamAppId="$STEAM_COMPAT_APP_ID"
|
export SteamAppId="$STEAM_COMPAT_APP_ID"
|
||||||
export SteamGameId="$STEAM_COMPAT_APP_ID"
|
export SteamGameId="$STEAM_COMPAT_APP_ID"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user