diff --git a/anda/games/gamescope/gamescope-legacy.sh b/anda/games/gamescope/gamescope-legacy.sh index 25485be803..3da260e967 100644 --- a/anda/games/gamescope/gamescope-legacy.sh +++ b/anda/games/gamescope/gamescope-legacy.sh @@ -5,27 +5,16 @@ gamescope_path="/usr/bin/gamescope" -# Extra configuration for the people who need it, at $XDG_CONFIG_HOME/gamescope/legacy.conf or /etc/gamescope/legacy.conf -# Should import an GAMESCOPE_LEGACY_ARGS variable -# -# We should document this in Fyra Devdocs later - - -if [ -f "$XDG_CONFIG_HOME/gamescope/legacy.conf" ]; then - . "$XDG_CONFIG_HOME/gamescope/legacy.conf" -elif [ -f "/etc/gamescope/legacy.conf" ]; then - . "/etc/gamescope/legacy.conf" -else - GAMESCOPE_LEGACY_ARGS="" +# check if $BACKEND is already defined +# todo: Probably want to patch gamescope-session-plus for this instead meow +LEGACY_BACKEND_ARGS="" +if [ -z "$BACKEND" ]; then + LEGACY_BACKEND_ARGS="--backend=sdl" fi - -# Check if we have a $DISPLAY variable, because if not then we're probably not -# running nested - if [ -z "$DISPLAY" ]; then - $gamescope_path --backend=drm --expose-wayland $GAMESCOPE_LEGACY_ARGS $@ + $gamescope_path $LEGACY_BACKEND_ARGS $@ else - $gamescope_path --backend=sdl $GAMESCOPE_LEGACY_ARGS $@ + $gamescope_path $LEGACY_BACKEND_ARGS $@ fi