From 084aa2f6a09cc5d8976997c989a135fac2cb4bca Mon Sep 17 00:00:00 2001 From: The412Banner <205237651+The412Banner@users.noreply.github.com> Date: Wed, 18 Nov 2026 04:51:10 -0500 Subject: [PATCH] fix(bionic): Steam store games reach DroidDeck's Steam The bionic layer redirects a game's steamclient(64).dll to lsteamclient only when WINE_LSTEAMCLIENT is set, and launch.sh never set it. Valve's Windows steamclient then ran on its own, SteamAPI_Init failed ("Failed to load module ... steamclient64.dll"), and Brawlhalla's Steam extension read a null pointer. The unwind of that fault looped in Wine's RtlIsEcCode until the main thread ran out of stack, so Steam showed its launch spinner forever. launch.sh now sets WINE_LSTEAMCLIENT=1 (a game's environment can still set 0) and copies Steam's legacycompat client files into the prefix as Proton does, because a prefix this tool creates has no C:\Program Files (x86)\Steam\steamclient64.dll. Tested on the Pocket FIT (r22 with this launch.sh): Brawlhalla (291550) reaches its main menu at 144 fps, connected to Steam and its servers; the copy step restored both steamclient DLLs after they were moved aside. --- tools/bionic-runtime/tool/launch.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/bionic-runtime/tool/launch.sh b/tools/bionic-runtime/tool/launch.sh index dd873bf270..8bfe6af767 100644 --- a/tools/bionic-runtime/tool/launch.sh +++ b/tools/bionic-runtime/tool/launch.sh @@ -91,6 +91,9 @@ export FEX_TSOENABLED=${FEX_TSOENABLED:-1} FEX_VECTORTSOENABLED=${FEX_VECTORTSOE echo "fex $(env | grep '^FEX_' | sort | tr '\n' ' ')" echo "sync ntsync=$WINENTSYNC esync=$WINEESYNC ssbs=${WINE_FORCE_SSBS:-0} tu_debug=${TU_DEBUG:-} kept=$(echo $KEEP)" export WINESTEAMCLIENTPATH64=$ROOTFS/root/.local/share/Steam/androidarm64/libsteamclient.so +# The layer sends a game's steamclient(64).dll to lsteamclient (and so to DroidDeck's Steam through the library +# above) only with WINE_LSTEAMCLIENT set; without it Valve's Windows steamclient runs alone and SteamAPI_Init fails. +export WINE_LSTEAMCLIENT=${WINE_LSTEAMCLIENT:-1} export DXVK_LOG_PATH=$COMPAT PULSE_SERVER=unix:$APP/pulseaudio/PS0 export ANDROID_SYSVSHM_SERVER=$COMPAT/.no-sysvshm-server # its client faults on an unset name, inside a Wine lock @@ -214,6 +217,21 @@ prefix_busy || rm -f "$NTSYNC_SHM".v* prepare_prefix +# Steam's Windows client files in the prefix, the ones Proton copies from Steam's legacycompat folder: a game's +# steam_api loads C:\Program Files (x86)\Steam\steamclient64.dll, and a prefix this tool made has none. +SC=$ROOTFS/root/.local/share/Steam/legacycompat +D="$COMPAT/pfx/drive_c/Program Files (x86)/Steam" +if [ -d "$SC" ]; then + mkdir -p "$D" + for c in steamclient.dll:steamclient.dll steamclient64.dll:steamclient64.dll GameOverlayRenderer64.dll:GameOverlayRenderer64.dll \ + SteamService.exe:steam.exe Steam.dll:Steam.dll; do + s=$SC/${c%%:*}; d=$D/${c#*:} + [ -f "$s" ] || continue + [ -f "$d" ] && [ ! "$s" -nt "$d" ] && continue + cp "$s" "$d.new" && mv -f "$d.new" "$d" && touch -r "$s" "$d" && echo "$(date +%H:%M:%S) Steam client file ${c#*:}" + done +fi + # D7VK (Direct3D 7 and older on Vulkan) for 32-bit games when PROTON_USE_D7VK is set and not 0, as DroidDeck-Proton: # its ddraw.dll in syswow64 with Wine's own beside it as ddraw_.dll. Switched off, Wine's link goes back. Only the # links in the prefix are removed, never the files they point to.