diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 43e74193..c93c5934 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240829-2 (gamescope-use-getgamescopearg-for-gsshwres-gsintres)" +PROGVERS="v14.0.20240829-3 (gamescope-use-getgamescopearg-for-gsshwres-gsintres)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -11825,19 +11825,25 @@ function GameScopeGui { # Build the GameScope arguments string unset GAMESCOPE_ARGS + GAMESCOPE_ARGS="" + + # Internal width/height (-w, -h) broken out from string like '1280x720' + # NOTE: In future if `GSINTW` is blank but `GSINTH` is set, we could calculate a corresponding 16:9 width like GameScope does GSINTW1="${GSINTRES%x*}" GSINTW="${GSINTW1%%-*}" GSINTH1="${GSINTRES#*x}" GSINTH="${GSINTH1%%-*}" - GAMESCOPE_ARGS="-w ${GSINTW} -h ${GSINTH}" + # Show width/height (-W, -H) broken out from string like '1280x720' + # NOTE: In future if `GSINTW` is blank but `GSINTH` is set, we could calculate a corresponding 16:9 width like GameScope does GSSHWW1="${GSSHWRES%x*}" GSSHWW="${GSSHWW1%%-*}" GSSHWH1="${GSSHWRES#*x}" GSSHWH="${GSSHWH1%%-*}" - GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -W ${GSSHWW} -H ${GSSHWH}" ### GENERAL OPTIONS ### + if [ -n "$GSINTW" ] && [ -n "$GSINTH" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -w ${GSINTW} -h ${GSINTH}"; fi + if [ -n "$GSSHWW" ] && [ -n "$GSSHWH" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -W ${GSSHWW} -H ${GSSHWH}"; fi if [ "$GSFLR" -eq "$GSFLR" ] 2>/dev/null ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -r ${GSFLR}"; fi if [ "$GSFLU" -eq "$GSFLU" ] 2>/dev/null ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -o ${GSFLU}"; fi if [ "$GSFS" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -f"; fi