diff --git a/ULWGL b/ULWGL index 074d78d..91d95b2 100755 --- a/ULWGL +++ b/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" diff --git a/gamelauncher.sh b/gamelauncher.sh index 45b0329..59e4364 100755 --- a/gamelauncher.sh +++ b/gamelauncher.sh @@ -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"