mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: Steam's Browse buttons work when another app holds port 8080 with Decky enabled (#1798)
This commit is contained in:
1 parent
23bb361006
commit
26e2f26ec9
2 files changed
+97
-8
No files matched your search
@@ -101,6 +101,22 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
if [ "${BL_ZRAM:-0}" = 1 ]; then printf 0 > /tmp/.bl-zram; else rm -f /tmp/.bl-zram; fi
|
||||
fi
|
||||
|
||||
steam_devtools() {
|
||||
_bl_cdp=()
|
||||
if [ -f "$steam_root/.cef-enable-remote-debugging" ]; then
|
||||
if timeout 5 python3 -c 'import socket, sys
|
||||
s = socket.socket()
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
s.bind(("127.0.0.1", int(sys.argv[1])))' "$1" 2>/dev/null; then
|
||||
BL_CDP_PORT=$1
|
||||
return 0
|
||||
fi
|
||||
echo "== steam: port $1 is held by another app; Decky cannot load this session and Steam's devtools use another port"
|
||||
fi
|
||||
BL_CDP_PORT=$((20000 + RANDOM % 30000))
|
||||
_bl_cdp=(-cef-enable-debugging -devtools-port "$BL_CDP_PORT")
|
||||
}
|
||||
|
||||
steam_update_stuck() {
|
||||
local stamp
|
||||
stamp=$(stat -c '%n %Y %s' "${steam_root:-}"/package/*.installed 2>/dev/null)
|
||||
@@ -983,14 +999,9 @@ case $mode in
|
||||
echo "== Decky: installed loader architecture is unsupported by this guest; not starting"
|
||||
fi
|
||||
fi
|
||||
_bl_cdp=()
|
||||
if [ -f "$steam_root/.cef-enable-remote-debugging" ]; then
|
||||
export BL_CDP_PORT=8080
|
||||
else
|
||||
export BL_CDP_PORT=$((20000 + RANDOM % 30000))
|
||||
_bl_cdp=(-cef-enable-debugging -devtools-port "$BL_CDP_PORT")
|
||||
fi
|
||||
if [ -f "$HOME/.droiddeck-decky-enabled" ] && [ "${decky_arch:-}" = x86_64 ]; then
|
||||
steam_devtools 8080
|
||||
export BL_CDP_PORT
|
||||
if [ -f "$HOME/.droiddeck-decky-enabled" ] && [ "${decky_arch:-}" = x86_64 ] && [ ${#_bl_cdp[@]} = 0 ]; then
|
||||
echo "== steam: devtools port $BL_CDP_PORT left open for the x86_64 Decky loader"
|
||||
else
|
||||
export BL_CDP_GUARD=$BL_CDP_PORT
|
||||
|
||||
Reference in new issue
Block a user