Skip to content

Commit

Permalink
GameScope: Add new VR flags (#847)
Browse files Browse the repository at this point in the history
Adds two new GameScope VR flags:
* SteamVR Overlay Key (--vr-overlay-key)
* VR Scroll Speed (--vr-scrolls-speed)
  • Loading branch information
sonic2kk authored Jul 2, 2023
1 parent d9214f1 commit 5799f33
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 26 deletions.
4 changes: 4 additions & 0 deletions lang/chinese.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/dutch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1185,3 +1185,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/englishUK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1186,3 +1186,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/italian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/polish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
4 changes: 4 additions & 0 deletions lang/russian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ GUI_GSFLTR="GameScope Filter Mode"
DESC_GSFLTR="use a filter such as AMD FidelityFX SuperResolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS)"
GUI_GSSCALE="GameScope Scale Mode"
DESC_GSSCALE="specify how to scale the GameScope window content"
GUI_GSVROVERLAYKEY="SteamVR Overlay Key"
DESC_GSVROVERLAYKEY="sets the SteamVR Overlay Key to this value"
GUI_GSVRSCROLLSSPEED="VR Trackpad Scroll Speed"
DESC_GSVRSCROLLSSPEED="sets the trackpad mouse scrolling speed in VR - Default value is 8.0"
64 changes: 38 additions & 26 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.20230702-2"
PROGVERS="v14.0.20230702-3"
PROGCMD="${0##*/}"
SHOSTL="stl"
GHURL="https://github.com"
Expand Down Expand Up @@ -10006,6 +10006,9 @@ function setGameScopeVars {
# SteamVR Default Name when no window title available (--vr-overlay-default-name) -- Textbox
GSVRDEFNAM="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-overlay-default-name" "$GSVRDEFNAM" "" "" "txt" )"

# SteamVR Overlay Key String (--vr-overlay-key) -- Textbox
GSVROVERLAYKEY="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-overlay-key" "$GSVROVERLAYKEY" "" "" "txt" )"

# SteamVR Overlay Icon (--vr-overlay-icon) -- Similar to cursor picker -- File picker
GSVRICONENABLE="0"
GSVRICON="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-overlay-icon" "$GSVRICON" "" "" "path" )"
Expand All @@ -10023,6 +10026,9 @@ function setGameScopeVars {
# Enable SteamVR Close Button on Control Bar (--vr-overlay-enable-control-bar-close) -- Checkbox
GSVRCONTROLBARCLOSE="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-overlay-enable-control-bar-close" "$GSVRCONTROLBARCLOSE" "1" "0" )"

# VR Trackpad Scroll Speed (--vr-scrolls-speed) -- Spinner
GSVRSCROLLSSPEED="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-scrolls-speed" "$GSVRSCROLLSSPEED" "" "8.0" "num" )"

# Show SteamVR Overlay as Modal (--vr-overlay-modal) -- Checkbox
GSVRMODAL="$( getGameScopeArg "$GAMESCOPE_ARGS" "--vr-overlay-modal" "$GSVRMODAL" "1" "0" )"
}
Expand Down Expand Up @@ -10173,12 +10179,14 @@ function GameScopeGui {
--field="$GUI_GSVR!$DESC_GSVR ('GSVR')":CHK "$GSVR" \
--field="$GUI_GSVREXNA!$DESC_GSVREXNA ('GSVREXNA')" "$GSVREXNA" \
--field="$GUI_GSVRDEFNAM!$DESC_GSVRDEFNAM ('GSVRDEFNAM')" "$GSVRDEFNAM" \
--field="$GUI_GSVROVERLAYKEY!$DESC_GSVROVERLAYKEY ('GSVROVERLAYKEY')" "$GSVROVERLAYKEY" \
--field="$GUI_GSVRICONENABLE!$DESC_GSVRICONENABLE ('GSVRICONENABLE')":CHK "$GSVRICONENABLE" \
--field="$GUI_GSVRICON!$DESC_GSVRICON ('GSVRICON')":FL "${GSVRICON//\"}" \
--field="$GUI_GSVRSHOIMM!$DESC_GSVRSHOIMM ('GSVRSHOIMM')":CHK "$GSVRSHOIMM" \
--field="$GUI_GSVRCONTROLBAR!$DESC_GSVRCONTROLBAR ('GSVRCONTROLBAR')":CHK "$GSVRCONTROLBAR" \
--field="$GUI_GSVRCONTROLBARKEYBOARD!$DESC_GSVRCONTROLBARKEYBOARD ('GSVRCONTROLBARKEYBOARD')":CHK "$GSVRCONTROLBARKEYBOARD" \
--field="$GUI_GSVRCONTROLBARCLOSE!$DESC_GSVRCONTROLBARCLOSE ('GSVRCONTROLBARCLOSE')":CHK "$GSVRCONTROLBARCLOSE" \
--field="$GUI_GSVRSCROLLSSPEED!$DESC_GSVRSCROLLSSPEED ('GSVRSCROLLSSPEED')":NUM "$GSVRSCROLLSSPEED" \
--field="$GUI_GSVRMODAL!$DESC_GSVRMODAL ('GSVRMODAL')":CHK "$GSVRMODAL" \
--field="$(spanFont "$GUI_GSEMBEDDEDSET" "H")":LBL "SKIP" \
--field="$GUI_GSDEFTOUCHMODE!$DESC_GSDEFTOUCHMODE ('GSDEFTOUCHMODE')":CB "$(cleanDropDown "${GSDEFTOUCHMODE}" "${GSTOUCHMODES}")" \
Expand Down Expand Up @@ -10246,31 +10254,33 @@ function GameScopeGui {
GSVR="${GSARR[27]}"
GSVREXNA="${GSARR[28]}"
GSVRDEFNAM="${GSARR[29]}"
GSVRICONENABLE="${GSARR[30]}"
GSVRICON="${GSARR[31]}"
GSVRSHOIMM="${GSARR[32]}"
GSVRCONTROLBAR="${GSARR[33]}"
GSVRCONTROLBARKEYBOARD="${GSARR[34]}"
GSVRCONTROLBARCLOSE="${GSARR[35]}"
GSVRMODAL="${GSARR[36]}"
# GSARR[37] is the Embedded heading
GSDEFTOUCHMODE="${GSARR[38]}"
GSIMMEDIATEFLIPS="${GSARR[39]}"
GSADAPTIVESYNC="${GSARR[40]}"
GSPREFOUT="${GSARR[41]}"
GSDRMMODE="${GSARR[42]}"
# GSARR[43] is the Advanced heading
GSSTATSPATHENABLE="${GSARR[44]}"
GSSTATSPATH="${GSARR[45]}"
GSHIDECURSORDELAY="${GSARR[46]}"
GSFORCECOMP="${GSARR[47]}"
GSDEBUGHUD="${GSARR[48]}"
GSFORCEHDRSUPPORT="${GSARR[49]}"
GSFORCEHDROUTPUT="${GSARR[50]}"
GSPREFERVKDEVICE="${GSARR[51]}"
GSWAYLAND="${GSARR[52]}"
GSRT="${GSARR[53]}"
GSHDLS="${GSARR[54]}"
GSVROVERLAYKEY="${GSARR[30]}"
GSVRICONENABLE="${GSARR[31]}"
GSVRICON="${GSARR[32]}"
GSVRSHOIMM="${GSARR[33]}"
GSVRCONTROLBAR="${GSARR[34]}"
GSVRCONTROLBARKEYBOARD="${GSARR[35]}"
GSVRCONTROLBARCLOSE="${GSARR[36]}"
GSVRSCROLLSSPEED="${GSARR[37]}"
GSVRMODAL="${GSARR[38]}"
# GSARR[39] is the Embedded heading
GSDEFTOUCHMODE="${GSARR[40]}"
GSIMMEDIATEFLIPS="${GSARR[41]}"
GSADAPTIVESYNC="${GSARR[42]}"
GSPREFOUT="${GSARR[43]}"
GSDRMMODE="${GSARR[44]}"
# GSARR[45] is the Advanced heading
GSSTATSPATHENABLE="${GSARR[46]}"
GSSTATSPATH="${GSARR[47]}"
GSHIDECURSORDELAY="${GSARR[48]}"
GSFORCECOMP="${GSARR[49]}"
GSDEBUGHUD="${GSARR[50]}"
GSFORCEHDRSUPPORT="${GSARR[51]}"
GSFORCEHDROUTPUT="${GSARR[52]}"
GSPREFERVKDEVICE="${GSARR[53]}"
GSWAYLAND="${GSARR[54]}"
GSRT="${GSARR[55]}"
GSHDLS="${GSARR[56]}"

# Build the GameScope arguments string
unset GAMESCOPE_ARGS
Expand Down Expand Up @@ -10381,11 +10391,13 @@ function GameScopeGui {
if [ "$GSVR" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --openvr"; fi
if [ "${#GSVREXNA}" -gt 0 ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-explicit-name '${GSVREXNA}'"; fi # Don't set explicit name if it's blank
if [ "${#GSVRDEFNAM}" -gt 0 ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-default-name '${GSVRDEFNAM}'"; fi # Don't set default name if it's blank
if [ "${#GSVROVERLAYKEY}" -gt 0 ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-key '${GSVROVERLAYKEY}'"; fi # Don't set overlay key if it's blank
if [ -f "$GSVRICON" ] && [ "$GSVRICONENABLE" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-icon '${GSVRICON}'"; fi
if [ "$GSVRSHOIMM" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-show-immediately"; fi
if [ "$GSVRCONTROLBAR" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-enable-control-bar"; fi
if [ "$GSVRCONTROLBARKEYBOARD" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-enable-control-bar-keyboard"; fi
if [ "$GSVRCONTROLBARCLOSE" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-enable-control-bar-close"; fi
if [ "$GSVRSCROLLSSPEED" -gt 8 ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-scrolls-speed ${GSVRSCROLLSSPEED}"; fi # 8.0 is the default value
if [ "$GSVRMODAL" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --vr-overlay-modal"; fi
### VR OPTIONS END

Expand Down

0 comments on commit 5799f33

Please sign in to comment.