Skip to content

Commit

Permalink
GameScope: Add Mouse Sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk committed Jan 27, 2024
1 parent 6fc2a35 commit 6a7a517
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 47 deletions.
2 changes: 2 additions & 0 deletions lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
100 changes: 53 additions & 47 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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...
}
Expand Down Expand Up @@ -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}")" \
Expand Down Expand Up @@ -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
Expand All @@ -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 ###

Expand Down

0 comments on commit 6a7a517

Please sign in to comment.