From 6a7a51777fa84da5d1b181e433028ecf67a68c45 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sat, 27 Jan 2024 01:25:07 +0000 Subject: [PATCH] GameScope: Add Mouse Sensitivity --- lang/english.txt | 2 + steamtinkerlaunch | 100 ++++++++++++++++++++++++---------------------- 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/lang/english.txt b/lang/english.txt index c65ca63e..d2152046 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1277,3 +1277,5 @@ GUI_FSGDBAWAPPLYARTWORK="Apply Artwork" DESC_FSGDBAWAPPLYARTWORK="Download artwork into Steam grid directory to apply to apply it immediately" NOTY_FSGDBAW="Fetching SteamGridDB Artwork for 'XXX'" NOTY_FSGDBAWINVALID="Cannot fetch SteamGridDB Artwork, must provide AppID, Game ID, or Game Name!" +GUI_GSMOUSESENSITIVITY="Mouse Sensitivity" +DESC_GSMOUSESENSITIVITY="configurable mouse sensitivity, multiply mouse movement by specified decimal number amount" diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 43d03bbb..7c73af06 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240119-1" +PROGVERS="v14.0.20240127-1 (gamescope-mouse-sensitivity)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -11125,6 +11125,9 @@ function setGameScopeVars { GSCURSOR="$( getGameScopeArg "$GAMESCOPE_ARGS" "--cursor" "$GSCURSOR" "" "" "path" )" if [ -n "$GSCURSOR" ]; then GSENABLECUSTCUR="1"; fi + # Mouse Sensitivity (-s) -- Spinner + GSMOUSESENSITIVITY="$( getGameScopeArg "$GAMESCOPE_ARGS" "-s" "$GSMOUSESENSITIVITY" "" "1.0" "num" )" + # There is a `--cursor-scale-height` option, but at time of writing (15/02/23) this doesn't seem to do anything - We can add it in future, but not now # There is a `--framerate-limit` option, but I am not totally sure how it differs from -r/-o -- I tested it out and the behaviour seemed identical? Maybe one works in both nested/embedded and the other doesn't, not sure... } @@ -11400,6 +11403,7 @@ function GameScopeGui { --field="$GUI_GSFOOR!$DESC_GSFOOR ('GSFOOR')":CB "$(cleanDropDown "${GSFOOR}" "${GSFOOROPTS}")" \ --field="$GUI_GSENABLECUSTCUR!$GUI_GSENABLECUSTCUR ('GSENABLECUSTCUR')":CHK "$GSENABLECUSTCUR" \ --field="$GUI_GSCURSOR!$DESC_GSCURSOR ('GSCURSOR')":FL "${GSCURSOR/#-/ -}" \ + --field="$GUI_GSMOUSESENSITIVITY!$DESC_GSMOUSESENSITIVITY ('GSMOUSESENSITIVITY')":NUM "${GSMOUSESENSITIVITY/#-/ -}" \ --field="$(spanFont "$GUI_GSFILTERINGSET" "H")":LBL "SKIP" \ --field="$GUI_GSFLTR!$DESC_GSFLTR ('GSFLTR')":CBE "$(cleanDropDown "${GSFLTR}" "${GSFLTROPTS}")" \ --field="$GUI_GSSCALE!$DESC_GSSCALE ('GSSCALE')":CBE "$(cleanDropDown "${GSSCALE}" "${GSSCALEOPTS}")" \ @@ -11479,52 +11483,53 @@ function GameScopeGui { GSFOOR="${GSARR[12]}" GSENABLECUSTCUR="${GSARR[13]}" GSCURSOR="${GSARR[14]}" - # GSARR[15] is the Filtering heading - GSFLTR="${GSARR[16]}" - GSSCALE="${GSARR[17]}" - GSFSRS="${GSARR[18]}" - GSMSF="${GSARR[19]}" - GSRSEP="${GSARR[20]}" - GSRSTI="${GSARR[21]}" - # GSARR[22] is the HDR heading - GSHDR="${GSARR[23]}" - GSHDRWGFS="${GSARR[24]}" - GSHDRSCNITS="${GSARR[25]}" - GSHDRITM="${GSARR[26]}" - GSHDRITMSDRNITS="${GSARR[27]}" - GSHDRITMTGTNITS="${GSARR[28]}" - # GSARR[29] is the VR heading - GSVR="${GSARR[30]}" - GSVREXNA="${GSARR[31]}" - GSVRDEFNAM="${GSARR[32]}" - GSVROVERLAYKEY="${GSARR[33]}" - GSVRICONENABLE="${GSARR[34]}" - GSVRICON="${GSARR[35]}" - GSVRSHOIMM="${GSARR[36]}" - GSVRCONTROLBAR="${GSARR[37]}" - GSVRCONTROLBARKEYBOARD="${GSARR[38]}" - GSVRCONTROLBARCLOSE="${GSARR[39]}" - GSVRSCROLLSSPEED="${GSARR[40]}" - GSVRMODAL="${GSARR[41]}" - # GSARR[42] is the Embedded heading - GSDEFTOUCHMODE="${GSARR[43]}" - GSIMMEDIATEFLIPS="${GSARR[44]}" - GSADAPTIVESYNC="${GSARR[45]}" - GSPREFOUT="${GSARR[46]}" - GSDRMMODE="${GSARR[47]}" - # GSARR[48] is the Advanced heading - GSSTATSPATHENABLE="${GSARR[49]}" - GSSTATSPATH="${GSARR[50]}" - GSHIDECURSORDELAY="${GSARR[51]}" - GSFORCECOMP="${GSARR[52]}" - GSDEBUGHUD="${GSARR[53]}" - GSFORCEHDRSUPPORT="${GSARR[54]}" - GSFORCEHDROUTPUT="${GSARR[55]}" - GSPREFERVKDEVICE="${GSARR[56]}" - GSWAYLAND="${GSARR[57]}" - GSRT="${GSARR[58]}" - GSHDLS="${GSARR[59]}" - USEGAMESCOPEWSI="${GSARR[60]}" + GSMOUSESENSITIVITY="${GSARR[15]}" + # GSARR[16] is the Filtering heading + GSFLTR="${GSARR[17]}" + GSSCALE="${GSARR[18]}" + GSFSRS="${GSARR[19]}" + GSMSF="${GSARR[20]}" + GSRSEP="${GSARR[21]}" + GSRSTI="${GSARR[22]}" + # GSARR[23] is the HDR heading + GSHDR="${GSARR[24]}" + GSHDRWGFS="${GSARR[25]}" + GSHDRSCNITS="${GSARR[26]}" + GSHDRITM="${GSARR[27]}" + GSHDRITMSDRNITS="${GSARR[28]}" + GSHDRITMTGTNITS="${GSARR[29]}" + # GSARR[30] is the VR heading + GSVR="${GSARR[31]}" + GSVREXNA="${GSARR[32]}" + GSVRDEFNAM="${GSARR[33]}" + GSVROVERLAYKEY="${GSARR[34]}" + GSVRICONENABLE="${GSARR[35]}" + GSVRICON="${GSARR[36]}" + GSVRSHOIMM="${GSARR[37]}" + GSVRCONTROLBAR="${GSARR[38]}" + GSVRCONTROLBARKEYBOARD="${GSARR[39]}" + GSVRCONTROLBARCLOSE="${GSARR[40]}" + GSVRSCROLLSSPEED="${GSARR[41]}" + GSVRMODAL="${GSARR[42]}" + # GSARR[43] is the Embedded heading + GSDEFTOUCHMODE="${GSARR[44]}" + GSIMMEDIATEFLIPS="${GSARR[45]}" + GSADAPTIVESYNC="${GSARR[46]}" + GSPREFOUT="${GSARR[47]}" + GSDRMMODE="${GSARR[48]}" + # GSARR[49] is the Advanced heading + GSSTATSPATHENABLE="${GSARR[50]}" + GSSTATSPATH="${GSARR[51]}" + GSHIDECURSORDELAY="${GSARR[52]}" + GSFORCECOMP="${GSARR[53]}" + GSDEBUGHUD="${GSARR[54]}" + GSFORCEHDRSUPPORT="${GSARR[55]}" + GSFORCEHDROUTPUT="${GSARR[56]}" + GSPREFERVKDEVICE="${GSARR[57]}" + GSWAYLAND="${GSARR[58]}" + GSRT="${GSARR[59]}" + GSHDLS="${GSARR[60]}" + USEGAMESCOPEWSI="${GSARR[61]}" # Build the GameScope arguments string unset GAMESCOPE_ARGS @@ -11550,6 +11555,7 @@ function GameScopeGui { if [ "$GSFGC" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --force-grab-cursor"; fi if [ "$GSFGK" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -g"; fi if [ -f "$GSCURSOR" ] && [ "$GSENABLECUSTCUR" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --cursor '${GSCURSOR}'"; fi + if [ "$GSMOUSESENSITIVITY" -gt 1.0 ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -s ${GSMOUSESENSITIVITY}"; fi if [ ! "$GSFOOR" == "$GSNORM" ] && [ -n "$GSFOOR" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --force-orientation ${GSFOOR}"; fi # Only force orientation if option other than default 'normal' is selected ### GENERAL OPTIONS END ###