fix(ui): Started from Steam, the app runs without Steam's overlay (Qt aborted) and stays in the foreground, so Steam Input gives it the controller

This commit is contained in:
theupriser committed 2026-09-27 17:44:38 +02:00
1 parent 50b50cb726
commit 59c746b3fe
2 files changed
+13

No files matched your search

+5
View File
@@ -71,4 +71,9 @@ EOF
command -v update-desktop-database >/dev/null && update-desktop-database "$APPS" 2>/dev/null || true
say "Starting Steamify..."
# Started from Steam: stay in the foreground, or Steam counts the game as
# ended right away and stops giving it the controller.
if [[ -n "${SteamGameId:-}" ]]; then
exec "$DEST/ui/steamify-ui" < /dev/null
fi
setsid "$DEST/ui/steamify-ui" >/dev/null 2>&1 < /dev/null &
+8
View File
@@ -20,6 +20,14 @@ import tempfile
import threading
import time
# Started from Steam (a non-Steam game, so Steam Input hands it the
# controller): Steam preloads its overlay into every game, and Qt aborts with
# it loaded. Start again without it, before Qt is imported.
if "gameoverlayrenderer" in os.environ.get("LD_PRELOAD", ""):
os.environ["LD_PRELOAD"] = ":".join(p for p in os.environ["LD_PRELOAD"].split(":")
if p and "gameoverlayrenderer" not in p)
os.execv(sys.executable, [sys.executable] + sys.argv)
HERE = os.path.dirname(os.path.realpath(__file__))
try: