fix: avoid incompatible Turnip selection and explain Steam startup failures

This commit is contained in:
Danbro007 committed 2026-10-23 16:37:04 +08:00
1 parent ffa40a15d5
commit 42de5f3dd1
14 files changed
+381 -6

No files matched your search

@@ -901,13 +901,25 @@ x64_gpu_watch() {
x64_gpu_probe
}
x64_arm_webhelper_cpu_supported() {
local status=0
# Valve's native ARM web helper contains LSE atomics; missing CPU data cannot establish incompatibility.
awk -F: '
$1 ~ /^[[:space:]]*Features[[:space:]]*$/ {
if ($2 !~ /(^|[[:space:]])atomics([[:space:]]|$)/) unsupported = 1
}
END { exit unsupported ? 1 : 0 }
' /proc/cpuinfo 2>/dev/null || status=$?
[ "$status" != 1 ]
}
x64_exec() {
x64_env
cd "$STEAM_X64"
# The client checksums its files at start and reinstalls over edited ones, so the session shim (preload/net.c)
# swaps the web helper at exec. The arm64 helper only comes up against a client of the same build.
if [ "${BL_X64_X86_WEBHELPER:-0}" != 1 ] && [ -x /usr/local/bin/droiddeck-x64-arm-webhelper ] &&
[ -x "$ARM_STEAM/steamrtarm64/steamwebhelper" ]; then
[ -x "$ARM_STEAM/steamrtarm64/steamwebhelper" ] && x64_arm_webhelper_cpu_supported; then
local chan x86_build arm_build
chan=$(cat "$STEAM_X64/package/beta" 2>/dev/null || echo "$X64_CHANNEL")
x86_build=$(awk -F'"' '$2 == "version" { print $4; exit }' "$STEAM_X64/package/steam_client_${chan}_steamrt64.manifest" 2>/dev/null || true)
@@ -1142,4 +1154,4 @@ for attempt in 1 2 3 4 5; do
( x64_exec -clientbeta "$X64_CHANNEL" -no-cef-sandbox "${cef[@]}" "$@" ) >>"$LOG" 2>&1 || rc=$?
step "client exited rc=$rc"
[ "$rc" = 42 ] || break
done
done