From aedb64b01599cc28e5a768e6aec1fbf47c5e47f4 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 21 Apr 2024 03:48:03 +0100 Subject: [PATCH] setFullGameExePath: Use ALTEXEPATH if defined over CUSTOMCMD path --- steamtinkerlaunch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index dfc90c87..0ef090d0 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -9132,8 +9132,10 @@ function ShaderRepoDialog { function setFullGameExePath { if [[ ( "$USECUSTOMCMD" -eq 1 && -f "$CUSTOMCMD" && "$CUSTOMCMDRESHADE" -eq 1 ) || "$ONLY_CUSTOMCMD" -eq 1 ]]; then - FGEP="${CUSTOMCMD%/*}" - + # Use Alternative EXE Path if defined instead of custom command path + # We should only use the custom command directory if no alternatiive EXE path is defined, and + # we should prioritise the alt path if it is defined + FGEP="${DEFINEDALTEXEPATH:-${CUSTOMCMD%/*}}" writelog "INFO" "${FUNCNAME[0]} - Using the directory '$FGEP' of the used custom command as absolute game exe path" if [ "$CUSTOMCMDRESHADE" -eq 1 ]; then @@ -9582,9 +9584,7 @@ function installRSdll { function installReshade { if [ "$USERESHADE" -eq 1 ]; then prepareReshadeFiles - # setShadDestDir - # Use setShaderDest to avoid overwriting ALTEXEPATH if defined - setShaderDest + setShadDestDir # Have to use setShadDestDir because setShadDest will use ABSGAMEEXEPATH which is not Custom Command INSTDESTDIR="$SHADDESTDIR"