Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameScope: Add support for GameScope --backend option #1162

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lang/chinese.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1291,3 +1291,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/dutch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1288,3 +1288,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1290,3 +1290,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/englishUK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1292,3 +1292,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1289,3 +1289,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1292,3 +1292,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/italian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1290,3 +1290,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/polish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1290,3 +1290,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
2 changes: 2 additions & 0 deletions lang/russian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1290,3 +1290,5 @@ GUI_CUSTOMCMD_USESLR="Use Steam Linux Runtime with Custom Command"
DESC_CUSTOMCMD_USESLR="runs Custom Commands in the Steam Linux Runtime container that games use to improve compatibility, particularly for commands running via Proton (but it works for native commands as well). This option might get in the way of inter-process communication (i.e. an app that looks for a game process) and may be unnecessary for Linux shell scripts"
GUI_MO2SILENTMODEEXEOVERRIDE="Override ModOrganizer 2 Silent Mode Executable Configuration"
DESC_MO2SILENTMODEEXEOVERRIDE="use a different executable configuration in Silent Mode (i.e. launch 'SKSE64' instead of 'Skyrim Special Edition') -- When 'none' by default, ModOrganizer 2 will launch the configuation matching the name of the INI (i.e. Skyrim Special Edition)"
GUI_GSBACKEND="Rendering Backend"
DESC_GSBACKEND="rendering backend for GameScope to use -- Defaults to 'auto' which selects based on environment (e.g., 'sdl' on X11, 'wayland' on Wayland)"
33 changes: 20 additions & 13 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240903-1"
PROGVERS="v14.0.20240903-2"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -11581,6 +11581,9 @@ function setGameScopeVars {
GSSTATSPATH="$( getGameScopeArg "$GAMESCOPE_ARGS" "--stats-path" "$GSSTATSPATH" "" "" "path" )"
if [ -n "$GSSTATSPATH" ]; then GSSTATSPATHENABLE="1"; fi

# Backend for GameScope to use (--backend) -- Dropdown
GSBACKEND="$( getGameScopeArg "$GAMESCOPE_ARGS" "--backend" "$GSBACKEND" "" "auto" "cb" )"

# Amount of time in milliseconds to wait before hiding the cursor (-C) -- Spinner
GSHIDECURSORDELAY="$( getGameScopeArg "$GAMESCOPE_ARGS" "-C" "$GSHIDECURSORDELAY" "" "0" "num" )"

Expand Down Expand Up @@ -11625,6 +11628,7 @@ function setGameScopeVars {
GSTOUCHMODES="${GSDEF}!${GSHOVER}!${GSLEFTCLICK}!${GSRIGHTCLICK}!${GSMIDDLECLICK}!${GSPASSTHRU}" # Corresponds to 0,1,2,3,4 respectively internally by GameScope -- Default is ingored and the flag is not passed to GameScope
GSDRMMODES="${GSDEF}!cvt!fixed"
GSNEWFILTERMODE=0 # Whether gamescope uses -U/-Y/-n/-i (legacy) or -F/-S (new)
GSBACKENDOPTS="auto!sdl!wayland!drm!headless!openvr"

# Get values for UI elements based on existing GameScope args
getGameScopeGeneralOpts
Expand Down Expand Up @@ -11708,6 +11712,7 @@ function GameScopeGui {
--field="$GUI_GSPREFOUT!$DESC_GSPREFOUT ('GSPREFOUT')" "" \
--field="$GUI_GSDRMMODE!$DESC_GSDRMMODE ('GSDRMMODE')":CB "$(cleanDropDown "${GSDRMMODE}" "${GSDRMMODES}")" \
--field="$(spanFont "$GUI_GSADVOPTIONS" "H")":LBL "SKIP" \
--field="$GUI_GSBACKEND!$DESC_GSBACKEND ('GSBACKEND')":CBE "$(cleanDropDown "${GSBACKEND}" "${GSBACKENDOPTS}")" \
--field="$GUI_GSSTATSPATHENABLE!$DESC_GSSTATSPATHENABLE ('GSSTATSPATHENABLE')":CHK "$GSSTATSPATHENABLE" \
--field="$GUI_GSSTATSPATH!$DESC_GSSTATSPATH ('GSSTATSPATH')":DIR "${GSSTATSPATH//\"}" \
--field="$GUI_GSHIDECURSORDELAY!$DESC_GSHIDECURSORDELAY ('GSHIDECURSORDELAY')":NUM "${GSHIDECURSORDELAY/#-/ -}" \
Expand Down Expand Up @@ -11810,18 +11815,19 @@ function GameScopeGui {
GSPREFOUT="${GSARR[$GSEMBEDDEDHEADING + 4]}"
GSDRMMODE="${GSARR[$GSEMBEDDEDHEADING + 5]}"
# GSARR[49] is the Advanced heading
GSSTATSPATHENABLE="${GSARR[$GSADVANCEDHEADING + 1]}"
GSSTATSPATH="${GSARR[$GSADVANCEDHEADING + 2]}"
GSHIDECURSORDELAY="${GSARR[$GSADVANCEDHEADING + 3]}"
GSFORCECOMP="${GSARR[$GSADVANCEDHEADING + 4]}"
GSDEBUGHUD="${GSARR[$GSADVANCEDHEADING + 5]}"
GSFORCEHDRSUPPORT="${GSARR[$GSADVANCEDHEADING + 6]}"
GSFORCEHDROUTPUT="${GSARR[$GSADVANCEDHEADING + 7]}"
GSPREFERVKDEVICE="${GSARR[$GSADVANCEDHEADING + 8]}"
GSWAYLAND="${GSARR[$GSADVANCEDHEADING + 9]}"
GSRT="${GSARR[$GSADVANCEDHEADING + 10]}"
GSHDLS="${GSARR[$GSADVANCEDHEADING + 11]}"
USEGAMESCOPEWSI="${GSARR[$GSADVANCEDHEADING + 12]}"
GSBACKEND="${GSARR[$GSADVANCEDHEADING + 1]}"
GSSTATSPATHENABLE="${GSARR[$GSADVANCEDHEADING + 2]}"
GSSTATSPATH="${GSARR[$GSADVANCEDHEADING + 3]}"
GSHIDECURSORDELAY="${GSARR[$GSADVANCEDHEADING + 4]}"
GSFORCECOMP="${GSARR[$GSADVANCEDHEADING + 5]}"
GSDEBUGHUD="${GSARR[$GSADVANCEDHEADING + 6]}"
GSFORCEHDRSUPPORT="${GSARR[$GSADVANCEDHEADING + 7]}"
GSFORCEHDROUTPUT="${GSARR[$GSADVANCEDHEADING + 8]}"
GSPREFERVKDEVICE="${GSARR[$GSADVANCEDHEADING + 9]}"
GSWAYLAND="${GSARR[$GSADVANCEDHEADING + 10]}"
GSRT="${GSARR[$GSADVANCEDHEADING + 11]}"
GSHDLS="${GSARR[$GSADVANCEDHEADING + 12]}"
USEGAMESCOPEWSI="${GSARR[$GSADVANCEDHEADING + 13]}"

# Build the GameScope arguments string
unset GAMESCOPE_ARGS
Expand Down Expand Up @@ -11972,6 +11978,7 @@ function GameScopeGui {
# EMBEDDED OPTIONS END

## ADVANCED OPTIONS ###
if [ ! "$GSBACKEND" == "auto" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --backend ${GSBACKEND}"; fi # Don't pass GameScope Backend if left at "auto"; GameScope defaults to this anyway
if [ ! "$GSDRMMODE" == "${GSDEF}" ] && [ -n "$GSDRMMODE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --generate-drm-mode ${GSDRMMODE}"; fi # Don't pass DRM mode if "default"
if [ -d "$GSSTATSPATH" ] && [ "$GSSTATSPATHENABLE" == "TRUE" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} --stats-path '${GSSTATSPATH}'"; fi
if [ ! "$GSHIDECURSORDELAY" == "0" ] ; then GAMESCOPE_ARGS="${GAMESCOPE_ARGS} -C ${GSHIDECURSORDELAY}"; fi # Ignore cursor delay if it's 0
Expand Down