From 0b875421508cfe4779b439a7c12353a7cf785184 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 24 Sep 2023 18:37:16 +0100 Subject: [PATCH] Special K: Add option to specify Global SpecialK ReShade Version Override (#917) --- lang/chinese.txt | 4 ++++ lang/dutch.txt | 4 ++++ lang/english.txt | 4 ++++ lang/englishUK.txt | 4 ++++ lang/french.txt | 4 ++++ lang/german.txt | 4 ++++ lang/italian.txt | 4 ++++ lang/polish.txt | 4 ++++ lang/russian.txt | 4 ++++ steamtinkerlaunch | 27 ++++++++++++++++++++++++--- 10 files changed, 60 insertions(+), 3 deletions(-) diff --git a/lang/chinese.txt b/lang/chinese.txt index 8884b714..c346b820 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -1228,3 +1228,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/dutch.txt b/lang/dutch.txt index 5513a249..348c6f9b 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -1227,3 +1227,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/english.txt b/lang/english.txt index 57513d23..b0dc4926 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1228,3 +1228,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/englishUK.txt b/lang/englishUK.txt index eda74983..c3b6e087 100644 --- a/lang/englishUK.txt +++ b/lang/englishUK.txt @@ -1227,3 +1227,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/french.txt b/lang/french.txt index 6861894a..257cc5d8 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -1226,3 +1226,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/german.txt b/lang/german.txt index 2ed1f509..830bacd6 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -1229,3 +1229,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/italian.txt b/lang/italian.txt index d7b03496..4af04dfb 100644 --- a/lang/italian.txt +++ b/lang/italian.txt @@ -1227,3 +1227,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/polish.txt b/lang/polish.txt index 0c9d8299..30b55fb5 100644 --- a/lang/polish.txt +++ b/lang/polish.txt @@ -1227,3 +1227,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/lang/russian.txt b/lang/russian.txt index e499c123..697f8879 100644 --- a/lang/russian.txt +++ b/lang/russian.txt @@ -1227,3 +1227,7 @@ GUI_GSRSEP="ReShade Effects Path" DESC_GSRSEP="select the ReShade Effect for GameScope to load" GUI_GSRSTI="ReShade Technique Index" DESC_GSRSTI="ignored if value is 0" +GUI_USERSSPEKVERS="enable SpecialK ReShade Version Override" +DESC_USERSSPEKVERS="force the use of a specific, potentailly more compatible ReShade version when using SpecialK to load ReShade into a game" +GUI_RSSPEKVERS="SpecialK ReShade Version Override" +DESC_RSSPEKVERS="Version of ReShade to use when installing ReShade as a SpecialK Plugin" diff --git a/steamtinkerlaunch b/steamtinkerlaunch index e8213fad..d7a9bc60 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20230925-3" +PROGVERS="v14.0.20230925-4" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -2747,6 +2747,8 @@ function setDefaultCfgValues { if [ -z "$LUXTORPEDACMD" ] ; then LUXTORPEDACMD="$STEAMCOMPATOOLS/luxtorpeda/luxtorpeda"; fi if [ -z "$LUXTORPEDAARGS" ] ; then LUXTORPEDAARGS="wait-before-run"; fi if [ -z "$RSVERS" ] ; then RSVERS="5.9.1"; fi + if [ -z "$USERSSPEKVERS" ] ; then USERSSPEKVERS="1"; fi + if [ -z "$RSSPEKVERS" ] ; then RSSPEKVERS="5.4.2"; fi if [ -z "$AUTOBUMPRESHADE" ] ; then AUTOBUMPRESHADE="0"; fi if [ -z "$DOWNLOAD_RESHADE" ] ; then DOWNLOAD_RESHADE="1"; fi if [ -z "$RESHADESRCDIR" ] ; then RESHADESRCDIR="$STLDLDIR/reshade"; fi @@ -3226,6 +3228,10 @@ function saveCfg { echo "HEADLINEFONT=\"$HEADLINEFONT\"" echo "## $DESC_YADFORCEXWAYLAND" echo "YADFORCEXWAYLAND=\"$YADFORCEXWAYLAND\"" + echo "## DESC_USERSSPEKVERS" + echo "USERSSPEKVERS=\"$USERSSPEKVERS\"" + echo "## $DESC_RSSPEKVERS" + echo "RSSPEKVERS=\"$RSSPEKVERS\"" echo "## $DESC_USEWINDECO" echo "USEWINDECO=\"$USEWINDECO\"" echo "## $DESC_USETRAYICON" @@ -5332,6 +5338,8 @@ function AllSettingsEntriesDummyFunction { --field=" $GUI_RESHADEUPDATE!$DESC_RESHADEUPDATE ('RESHADEUPDATE')":CHK "${RESHADEUPDATE/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_RESHADEOVERRIDETOGGLE!$DESC_RESHADEOVERRIDETOGGLE ('RSOVRD')":CHK "${RSOVRD/#-/ -}" `#CAT_Shader` `#SUB_Checkbox` `#MENU_GAME` \ --field=" $GUI_RSVERS!$DESC_RSVERS ('RSVERS')" "${RSVERS/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ +--field=" $GUI_USERSSPEKVERS!$DESC_USERSSPEKVERS":CHK "${USERSSPEKVERS/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ +--field=" $GUI_RSSPEKVERS!$DESC_RSSPEKVERS ('RSSPEKVERS')" "${RSSPEKVERS/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ --field=" $GUI_AUTOBUMPRESHADE!$DESC_AUTOBUMPRESHADE ('AUTOBUMPRESHADE')":CHK "${AUTOBUMPRESHADE/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ --field=" $GUI_RS_32!$DESC_RS_32 ('RS_32')" "${RS_32/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ --field=" $GUI_RS_64!$DESC_RS_64 ('RS_64')" "${RS_64/#-/ -}" `#CAT_Shader` `#SUB_ReShade` `#MENU_GLOBAL` \ @@ -8112,13 +8120,21 @@ function dlReShade { } function overrideReShadeVersion { - if [ "$RSOVRD" -eq 1 ]; then # This is meant to be the checkbox var + ## ReShade version priority is as follows: + ## 1. Game Menu Override version ('RSOVRVERS') -- Only applies if 'RSOVRD' checkbox is toggled on + ## 2. SpecialK ReShade Override version ('RSSPEKVERS') -- Only applies if ReShade+SpecialK are used together, and if '$USERSSPEKVERS' checkbox is toggled on + ## 3. Global Menu ReShade version ('RSVERS') + + if [ "$RSOVRD" -eq 1 ]; then # Game Menu ReShade Override version -- Takes priority over Global ReShade version AND SpecialK ReShade version if [[ ! "$RSOVRVERS" = "$RSVERS" ]]; then writelog "INFO" "${FUNCNAME[0]} - Overriding global '$RESH' version '$RSVERS' with '$RSOVRVERS'" RSVERS="$RSOVRVERS" else writelog "SKIP" "${FUNCNAME[0]} - '$RESH' Override version and '$RESH' global version match - Not overriding" - fi + fi + elif [ "$USESPECIALK" -eq 1 ] && [ "$USERESHADE" -eq 1 ] && [ "$USERSSPEKVERS" -eq 1 ]; then # Global Menu ReShade version to load when ReShade is loaded via SpecialK + writelog "INFO" "${FUNCNAME[0]} - Overriding global '$RESH' version '$RSVERS' with SpecialK ReShade version override '$RSSPEKVERS' as it is enabled and ReShade+SpecialK are enabled together" + RSVERS="$RSSPEKVERS" else writelog "SKIP" "${FUNCNAME[0]} - '$RESH' override is disabled - Skipping" fi @@ -9298,6 +9314,11 @@ function useSpecialK { cp "${SPEKSRC//dll/pdb}" "$SPEKDDIR" echo "$SPEKDDIR/$SPEKPDB" >> "$SPEKENA" fi + elif [ "$SPEKDLLCONFLICTFOUND" -eq 0 ] && [ "$SHOULDINSTALLSPEK" -eq 0 ]; then + # In this scenario, SpecialK is already installed so we don't need to install it + # So write out the DLL name to the SPEKENA file to ensure we don't end up with a blank file + # We can't always write out to the file unconditionally as SPEKDLLCONFLICTFOUND means SpecialK wasn't installed + echo "$SPEKDST" >> "$SPEKENA" elif [ "$SPEKDLLCONFLICTFOUND" -eq 1 ]; then writelog "ERROR" "${FUNCNAME[0]} - Could not install SpecialK -- DLL naming conflict was found" fi