mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
x86-64 client: keep the arm64 compat pass off it
The session started droiddeck-steam-compat in x86-64 mode too. It attached to the x86-64 client and mapped titles to droiddeck-proton-arm64 by Valve's picks, Linux builds included (device: 112 titles; 35 of 39 Linux games), so the client ran them as Windows games: Borderlands 2's installed Linux build was swapped for the Windows one, another 1.1 GB. That name is also one the x86-64 client ignores (its wrapper is -a64), so Windows titles left on it had no tool. - droiddeck-session: no droiddeck-steam-compat when the client is x86-64. - droiddeck-steam-x64: droiddeck-proton-arm64 and Valve's proton_* entries count as automatic, so Linux games on them go to DroidDeck direct; picks made in the client's Properties still stay. - steam-compatibility --x64: droiddeck-proton-arm64 entries are repointed to the client's default Proton like Valve's (test added). On the device's settings: all 39 Linux games on DroidDeck direct, Windows titles back on GE-Proton.
This commit is contained in:
1 parent
f8c693b2dc
commit
c29362b53f
4 files changed
+27
-9
No files matched your search
@@ -832,7 +832,11 @@ BUSCONF
|
||||
export BL_CDP_GUARD=$BL_CDP_PORT
|
||||
echo "== steam: devtools port $BL_CDP_PORT, guest processes only"
|
||||
fi
|
||||
droiddeck-steam-compat "$steam_root" 2>&1 &
|
||||
# The live compat pass is the arm64 client's: it maps titles to its ARM64 Proton by Valve's picks,
|
||||
# Linux builds included - the x86-64 client ran those as Windows games and re-downloaded them
|
||||
# (device: 112 titles, Borderlands 2's Linux build swapped for the Windows one). That client's
|
||||
# mapping is droiddeck-steam-x64's (Windows titles to GE-Proton, Linux ones to DroidDeck direct).
|
||||
[ "$steam_x64" = 1 ] || droiddeck-steam-compat "$steam_root" 2>&1 &
|
||||
# The client exits 42 when it has updated itself and wants a fresh start (steam.sh does this).
|
||||
# BL_STEAM_UI=desktop = the client's desktop UI (a window, the library as a list), which the
|
||||
# desktop's launchers ask for; gamescope shows one window at a time and the game takes over.
|
||||
@@ -996,7 +1000,7 @@ BUSCONF
|
||||
echo "== steam: restarting once so the new compatibility layer is in the client's lists"
|
||||
# The client wrote config.vdf back from its own memory as it exited, which can drop the
|
||||
# per-title entries written while it ran - the very ones this restart is for.
|
||||
droiddeck-steam-compat "$steam_root" >/dev/null 2>&1 || true
|
||||
[ "$steam_x64" = 1 ] || droiddeck-steam-compat "$steam_root" >/dev/null 2>&1 || true
|
||||
set --
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -289,8 +289,8 @@ RUN
|
||||
# container, which needs user namespaces no Android app has, and the game would not start. The
|
||||
# client's own appinfo cache says which games have a Linux build and which runtime Valve gives them
|
||||
# (config/app_mappings: SteamLinuxRuntime_sniper or _soldier; none = scout). Those ids go to
|
||||
# direct-sniper for the tool's run script. A title already on another tool (chosen in Properties)
|
||||
# keeps it, except BL_X64_DIRECT_APPS (Left 4 Dead 2 by default), which is always taken back.
|
||||
# direct-sniper for the tool's run script. A title on a tool chosen in Properties keeps it, except
|
||||
# BL_X64_DIRECT_APPS (Left 4 Dead 2 by default), which is always taken back.
|
||||
# direct-auto.json lists what this mapped.
|
||||
import json, re, struct, sys
|
||||
path, appinfo, auto_file, sniper_file, extra = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5:]
|
||||
@@ -396,8 +396,11 @@ for app in sorted(games, key=int):
|
||||
if old:
|
||||
name = re.search(r'"name"\s*"([^"]*)"', inner[old[1]:old[2]])
|
||||
name = name.group(1) if name else ""
|
||||
# Another tool chosen for it (in Properties, or by Steam) stays; the forced ones are retaken.
|
||||
if name and name != "droiddeck-direct" and app not in extra:
|
||||
# Another tool chosen for it in Properties stays; the forced ones are retaken, and so are the
|
||||
# automatic ones: Valve's own Proton names and droiddeck-proton-arm64, the arm64 client's
|
||||
# name for its Proton, which only its live compat pass writes (here the wrapper is -a64).
|
||||
automatic = name in ("", "droiddeck-direct", "droiddeck-proton-arm64") or name.startswith("proton_")
|
||||
if not automatic and app not in extra:
|
||||
continue
|
||||
inner = inner[:old[0]] + inner[old[2] + 1:]
|
||||
entry = ('\n\t\t\t\t\t"%s"\n\t\t\t\t\t{\n\t\t\t\t\t\t"name"\t\t"droiddeck-direct"\n'
|
||||
|
||||
@@ -1177,7 +1177,10 @@ def x64_repoint(steam_root, tool, live=False):
|
||||
set_mapping(tokens, mapping, "0", tool)
|
||||
for app, name in current.items():
|
||||
named = name.lower()
|
||||
if named.startswith("proton") and named != tool.lower() and named not in keep:
|
||||
# droiddeck-proton-arm64: the arm64 client's name for its Proton, which this client ignores
|
||||
# (its wrapper is -a64), left by an arm64 compat pass that once ran against it.
|
||||
if (named.startswith("proton") or named == "droiddeck-proton-arm64") and named != tool.lower() \
|
||||
and named not in keep:
|
||||
set_mapping(tokens, mapping, app, tool)
|
||||
if app != "0":
|
||||
moved.append(app)
|
||||
|
||||
@@ -29,6 +29,12 @@ CONFIG = '''"InstallConfigStore"
|
||||
\t\t\t\t\t\t"config"\t\t""
|
||||
\t\t\t\t\t\t"priority"\t\t"250"
|
||||
\t\t\t\t\t}
|
||||
\t\t\t\t\t"880"
|
||||
\t\t\t\t\t{
|
||||
\t\t\t\t\t\t"name"\t\t"droiddeck-proton-arm64"
|
||||
\t\t\t\t\t\t"config"\t\t""
|
||||
\t\t\t\t\t\t"priority"\t\t"250"
|
||||
\t\t\t\t\t}
|
||||
\t\t\t\t\t"730"
|
||||
\t\t\t\t\t{
|
||||
\t\t\t\t\t\t"name"\t\t"steamlinuxruntime"
|
||||
@@ -71,16 +77,18 @@ class X64RepointTest(unittest.TestCase):
|
||||
|
||||
def test_repoints_valve_proton_only(self):
|
||||
moved = COMPAT["x64_repoint"](str(self.root), "GE-Proton11-7-a64")
|
||||
self.assertEqual(moved, ["550"])
|
||||
self.assertEqual(moved, ["550", "880"])
|
||||
m = self.mapping()
|
||||
self.assertEqual(m["550"], "GE-Proton11-7-a64")
|
||||
self.assertEqual(m["620"], "proton-cachyos-a64")
|
||||
self.assertEqual(m["730"], "steamlinuxruntime")
|
||||
# The arm64 client's own Proton name, which this client ignores.
|
||||
self.assertEqual(m["880"], "GE-Proton11-7-a64")
|
||||
self.assertEqual(m["0"], "GE-Proton11-7-a64")
|
||||
|
||||
def test_live_notes_pending_restart(self):
|
||||
COMPAT["x64_repoint"](str(self.root), "GE-Proton11-7-a64", live=True)
|
||||
self.assertEqual((Path(self.home.name) / ".bl-compat-pending").read_text(), "550\n")
|
||||
self.assertEqual((Path(self.home.name) / ".bl-compat-pending").read_text(), "550\n880\n")
|
||||
|
||||
def test_no_tool_changes_nothing(self):
|
||||
before = (self.root / "config" / "config.vdf").read_text()
|
||||
|
||||
Reference in new issue
Block a user