From c0e36f19a9e84b14dc76a1c4c0f494464ad572b9 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 16 Sep 2023 23:52:07 +0100 Subject: [PATCH] Add Non-Steam Game: Initial logic for writing out chosen compat tool to config.vdf --- steamtinkerlaunch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index c3ab30a2..bb5b5022 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -22458,6 +22458,7 @@ function addNonSteamGame { shift ;; -ct=*|--compatibilitytool=*) NOSTCOMPATTOOL="${i#*=}" + shift ;; ## Mostly lifted+shifted from setGameArt -hr=*|--hero=*) NOSTGHERO="${i#*=}" # _hero.png -- Banner used on game screen, logo goes on top of this @@ -22622,7 +22623,8 @@ function addNonSteamGame { if [ -n "$NOSTCOMPATTOOL" ]; then writelog "INFO" "${FUNCNAME[0]} - Adding selected compatibility tool '$NOSTCOMPATTOOL' for Non-Stteam Game..." - # TODO call function to write out to config VDF + NSGVDFVALS=( "name!${NOSTCOMPATTOOL}" "config!" "priority!250" ) + createVdfEntry "$CFGVDF" "CompatToolMapping" "$NOSTAIDGRID" "bottom" "${NSGVDFVALS[@]}" fi writelog "INFO" "${FUNCNAME[0]} - Finished adding new $NSGA"