From 025ab5885a010627ec675507c5ba073901b99610 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 9 Jun 2024 05:35:37 +0100 Subject: [PATCH] misc: Flatten checkFWS --- steamtinkerlaunch | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 227bdec3..d9c68744 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -13886,17 +13886,23 @@ function dlFWS { } function checkFWS { - if [ "$USEFWS" -eq 1 ]; then - dlFWS - if [ "$USEFWS" -eq 1 ]; then - writelog "INFO" "${FUNCNAME[0]} - 'USEFWS' is enabled - starting '$FWS' exe '$FWSEXE'" - setFWSArch - writelog "INFO" "${FUNCNAME[0]} - Starting '$FWSEXE' forked into the background" - restoreOrgVars - (sleep 5; "$RUNPROTON" run "$FWSEXE") & - emptyVars "O" "X" - fi + if [ "$USEFWS" -eq 0 ]; then + return fi + + dlFWS + if [ "$USEFWS" -eq 0 ]; then + return + fi + + writelog "INFO" "${FUNCNAME[0]} - 'USEFWS' is enabled - starting '$FWS' exe '$FWSEXE'" + setFWSArch + + writelog "INFO" "${FUNCNAME[0]} - Starting '$FWSEXE' forked into the background" + restoreOrgVars + + (sleep 5; "$RUNPROTON" run "$FWSEXE") & + emptyVars "O" "X" } function togWindows {