Skip to content

Commit

Permalink
Merge branch 'master' into lutris-ge-wine
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk committed Apr 13, 2023
2 parents bbde352 + d5c23f8 commit e383271
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 14 deletions.
2 changes: 2 additions & 0 deletions lang/chinese.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/dutch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1153,3 +1153,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/englishUK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1154,3 +1154,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/italian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/polish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
2 changes: 2 additions & 0 deletions lang/russian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,5 @@ GUI_CW_LUTRIS="Wine Lutris URL"
DESC_CW_LUTRIS="The project page of Lutris Wine"
GUI_CW_WINEGE="Wine-GE URL"
DESC_CW_WINEGE="The project page of Wine-GE"
GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information"
DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved"
40 changes: 26 additions & 14 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -2647,6 +2647,7 @@ function setDefaultCfgValues {
if [ -z "$USECUSTOMFALLBACKPIC" ] ; then USECUSTOMFALLBACKPIC="0"; fi
if [ -z "$GITHUBUSER" ] ; then GITHUBUSER="$NON"; fi
if [ -z "$DLGAMEDATA" ] ; then DLGAMEDATA="1"; fi
if [ -z "$DLSTEAMDECKCOMPATINFO" ] ; then DLSTEAMDECKCOMPATINFO="1"; fi
if [ -z "$USEPDBRATING" ] ; then USEPDBRATING="1"; fi
if [ -z "$PDBRATINGCACHE" ] ; then PDBRATINGCACHE="1"; fi
if [ -z "$DLWINETRICKS" ] ; then DLWINETRICKS="0"; fi
Expand Down Expand Up @@ -3099,6 +3100,8 @@ function saveCfg {
echo "GITHUBUSER=\"$GITHUBUSER\""
echo "## $DESC_DLGAMEDATA"
echo "DLGAMEDATA=\"$DLGAMEDATA\""
echo "## $DESC_DLSTEAMDECKCOMPATINFO"
echo "DLSTEAMDECKCOMPATINFO=\"$DLSTEAMDECKCOMPATINFO\""
echo "## $DESC_USEPDBRATING"
echo "USEPDBRATING=\"$USEPDBRATING\""
echo "## $DESC_PDBRATINGCACHE"
Expand Down Expand Up @@ -5040,6 +5043,7 @@ function AllSettingsEntriesDummyFunction {
--field=" $GUI_HEADLINEFONT!$DESC_HEADLINEFONT ('HEADLINEFONT')":CB "$(cleanDropDown "${HEADLINEFONT/#-/ -}" "$FONTSIZES")" `#CAT_Gui` `#MENU_GLOBAL` \
--field=" $GUI_USEWINDECO!$DESC_USEWINDECO ('USEWINDECO')":CHK "${USEWINDECO/#-/ -}" `#CAT_Gui` `#SUB_Checkbox` `#MENU_GLOBAL` \
--field=" $GUI_DLGAMEDATA!$DESC_DLGAMEDATA ('DLGAMEDATA')":CHK "${DLGAMEDATA/#-/ -}" `#CAT_Gui` `#SUB_Checkbox` `#MENU_GLOBAL` \
--field=" $GUI_DLSTEAMDECKCOMPATINFO!$DESC_DLSTEAMDECKCOMPATINFO ('DLSTEAMDECKCOMPATINFO')":CHK "${DLSTEAMDECKCOMPATINFO}" `#CAT_Gui` `#SUB_Checkbox` `#MENU_GLOBAL` \
--field=" $GUI_USEGAMEPICS!$DESC_USEGAMEPICS ('USEGAMEPICS')":CHK "${USEGAMEPICS/#-/ -}" `#CAT_Gui` `#SUB_Checkbox` `#MENU_GLOBAL` \
--field=" $GUI_USECUSTOMFALLBACKPIC!$DESC_USECUSTOMFALLBACKPIC ('USECUSTOMFALLBACKPIC')":CHK "${USECUSTOMFALLBACKPIC/#-/ -}" `#CAT_Gui` `#SUB_Checkbox` `#MENU_GLOBAL` \
--field=" $GUI_GITHUBUSER!$DESC_GITHUBUSER ('GITHUBUSER')":CBE "${GITHUBUSER/#-/ -}" `#CAT_Gui` `#MENU_GLOBAL` \
Expand Down Expand Up @@ -9275,12 +9279,16 @@ function askSettings {

# Tested and this should not break Non-Steam Games - Open an issue if it does!
prepareSteamDeckCompatInfo
STEAMDECKCOMPATOUT="<b>$GUI_SDCR:</b> ${STEAMDECKCOMPATRATING:$STEAMDECKCOMPAT_UNKNOWN}"
if ! [ -f "$STLGDECKCOMPAT/${AID}-deckcompatrating.json" ]; then
if [ ! -f "$STLGDECKCOMPAT/${AID}-deckcompatrating.json" ] && [ "$DLSTEAMDECKCOMPATINFO" -eq 1 ]; then
# If the Steam Deck compat rating json doesn't exist, assume something messed up e.g. offline or JQ is not installed
writelog "INFO" "${FUNCNAME[0]} - Could not retrieve Steam Deck compatibility rating, defaulting to $STEAMDECKCOMPAT_UNKNOWN - Maybe '$JQ' is missing or we are offline?"
fi

if [ -n "$STEAMDECKCOMPATRATING" ]; then
writelog "INFO" "${FUNCNAME[0]} - Fetched Steam Deck compatibility info, will show on wait requester"
STEAMDECKCOMPATOUT="<b>$GUI_SDCR:</b> ${STEAMDECKCOMPATRATING:$STEAMDECKCOMPAT_UNKNOWN}"
fi

writelog "INFO" "${FUNCNAME[0]} - Steam Deck compatibility rating string is '$STEAMDECKCOMPATOUT'"
writelog "INFO" "${FUNCNAME[0]} - Preparing to show Wait Requester"

Expand Down Expand Up @@ -22965,20 +22973,24 @@ function prepareSteamDeckCompatInfo {
return 1
fi

mapfile -d ";" -t -O "${#DECKCOMPATARR[@]}" DECKCOMPATARR <<< "$( getSteamDeckCompatInfo "$AID" )"
unset "DECKCOMPATARR[-1]"
if [ "$DLSTEAMDECKCOMPATINFO" -eq 1 ]; then
mapfile -d ";" -t -O "${#DECKCOMPATARR[@]}" DECKCOMPATARR <<< "$( getSteamDeckCompatInfo "$AID" )"
unset "DECKCOMPATARR[-1]"

if [ "${#DECKCOMPATARR[@]}" -eq "0" ]; then
writelog "INFO" "${FUNCNAME[0]} - No compatibility information available for '$AID' - Is this AppID definitely correct?"
if [ "${#DECKCOMPATARR[@]}" -eq "0" ]; then
writelog "INFO" "${FUNCNAME[0]} - No compatibility information available for '$AID' - Is this AppID definitely correct?"
else
# HTML symbols for Verified (checkmark), Playable (circled question mark) and Unsupported (no-entry sign)
COMPATMARK=""
case ${DECKCOMPATARR[0]} in
*"Verified"*) COMPATMARK="&#10003;" ;;
*"Playable"*) COMPATMARK="&#128712;" ;;
*"Unsupported"*) COMPATMARK="&#128683;" ;;
esac
STEAMDECKCOMPATRATING="${DECKCOMPATARR[0]} ${COMPATMARK}"
fi
else
# HTML symbols for Verified (checkmark), Playable (circled question mark) and Unsupported (no-entry sign)
COMPATMARK=""
case ${DECKCOMPATARR[0]} in
*"Verified"*) COMPATMARK="&#10003;" ;;
*"Playable"*) COMPATMARK="&#128712;" ;;
*"Unsupported"*) COMPATMARK="&#128683;" ;;
esac
STEAMDECKCOMPATRATING="${DECKCOMPATARR[0]} ${COMPATMARK}"
writelog "INFO" "${FUNCNAME[0]} - DLSTEAMDECKCOMPATINFO is '$DLSTEAMDECKCOMPATINFO' - Not fetching Steam Deck compatability info"
fi
}

Expand Down

0 comments on commit e383271

Please sign in to comment.