fix(deck): Only launch steam with -steamdeck if it's been run & updated at least once.

Fixes #214
This commit is contained in:
Kyle Gospodnetich 2023-08-29 09:09:40 -07:00
parent 7f844479d5
commit df9b89f6b7

View File

@ -1,5 +1,13 @@
#!/usr/bin/env bash
LAUNCH_OPTIONS=""
# If Steam has been launched before we can safely launch with -steamdeck
# to maintain the gamemode update branch
if [ -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]; then
LAUNCH_OPTIONS="-steamdeck"
fi
if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then
# https://github.com/Supreeeme/extest
# Extest is a drop in replacement for the X11 XTEST extension.
@ -7,7 +15,7 @@ if [[ "$XDG_SESSION_TYPE" = "wayland" ]]; then
# It's been primarily developed for allowing the desktop functionality
# on the Steam Controller to work while Steam is open on Wayland.
# Also supports Steam Input as a whole.
env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam -steamdeck "$*"
env LD_PRELOAD=/usr/lib/extest/libextest.so /usr/bin/steam "$LAUNCH_OPTIONS" "$*"
else
/usr/bin/steam -steamdeck "$*"
/usr/bin/steam "$LAUNCH_OPTIONS" "$*"
fi