From d5c23f8a23b8f7a17dc076fb1ba0d23cbc6191bd Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 12 Apr 2023 16:02:09 +0100 Subject: [PATCH] Global Menu: Add toggle for Steam Deck compatibility information (#782) --- lang/chinese.txt | 2 ++ lang/dutch.txt | 2 ++ lang/english.txt | 2 ++ lang/englishUK.txt | 2 ++ lang/french.txt | 2 ++ lang/german.txt | 2 ++ lang/italian.txt | 2 ++ lang/polish.txt | 2 ++ lang/russian.txt | 2 ++ steamtinkerlaunch | 42 +++++++++++++++++++++++++++--------------- 10 files changed, 45 insertions(+), 15 deletions(-) diff --git a/lang/chinese.txt b/lang/chinese.txt index a7289aa6..8cf9ee33 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/dutch.txt b/lang/dutch.txt index ff4fff78..a8b5371d 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/english.txt b/lang/english.txt index ab2e6a95..d534ce1d 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1149,3 +1149,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/englishUK.txt b/lang/englishUK.txt index 6974c240..e9acf4da 100644 --- a/lang/englishUK.txt +++ b/lang/englishUK.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/french.txt b/lang/french.txt index 0f99a010..88d8906a 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/german.txt b/lang/german.txt index 3b680e06..aab90531 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -1150,3 +1150,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/italian.txt b/lang/italian.txt index 61655fce..e00319b8 100644 --- a/lang/italian.txt +++ b/lang/italian.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/polish.txt b/lang/polish.txt index 3b3dcf27..772ec785 100644 --- a/lang/polish.txt +++ b/lang/polish.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/lang/russian.txt b/lang/russian.txt index 67ba542c..954a5a61 100644 --- a/lang/russian.txt +++ b/lang/russian.txt @@ -1148,3 +1148,5 @@ GUI_STLRAD_PFTST="RADV Perfest options" DESC_STLRAD_PFTST="A comma-separated list of named flags, which can be used to enable experimental driver features and performance enhancements for RADV Vulkan driver" GUI_MAHUDLSYM="Use MangoHud --dlsym" DESC_MAHUDLSYM="Append '--dlsym' to MangoHud - May fix OpenGL games not displaying MangoHud" +GUI_DLSTEAMDECKCOMPATINFO="Download Steam Deck compatibility information" +DESC_DLSTEAMDECKCOMPATINFO="Fetch Steam Deck compatibility information from Steam - Previously fetched compatibility information will be preserved" diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 42eaab01..2f0e6628 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20230412-1" +PROGVERS="v14.0.20230412-2 (network-toggles)" PROGCMD="${0##*/}" SHOSTL="stl" GHURL="https://github.com" @@ -2645,6 +2645,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 @@ -3093,6 +3094,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" @@ -5034,6 +5037,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` \ @@ -9267,12 +9271,16 @@ function askSettings { # Tested and this should not break Non-Steam Games - Open an issue if it does! prepareSteamDeckCompatInfo - STEAMDECKCOMPATOUT="$GUI_SDCR: ${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="$GUI_SDCR: ${STEAMDECKCOMPATRATING:$STEAMDECKCOMPAT_UNKNOWN}" + fi + writelog "INFO" "${FUNCNAME[0]} - Steam Deck compatibility rating string is '$STEAMDECKCOMPATOUT'" writelog "INFO" "${FUNCNAME[0]} - Preparing to show Wait Requester" @@ -22957,20 +22965,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="✓" ;; + *"Playable"*) COMPATMARK="🛈" ;; + *"Unsupported"*) COMPATMARK="🚫" ;; + 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="✓" ;; - *"Playable"*) COMPATMARK="🛈" ;; - *"Unsupported"*) COMPATMARK="🚫" ;; - esac - STEAMDECKCOMPATRATING="${DECKCOMPATARR[0]} ${COMPATMARK}" + writelog "INFO" "${FUNCNAME[0]} - DLSTEAMDECKCOMPATINFO is '$DLSTEAMDECKCOMPATINFO' - Not fetching Steam Deck compatability info" fi }