Keep a requested x86-64 default and accept linked anti-cheat runtimes

A request for the current automatic x86-64 default now marks it as the
app's choice, so the next settle no longer moves it back to ARM64.
Anti-cheat runtime discovery follows a symlinked runtime directory.
This commit is contained in:
maxjivi05 committed 2026-12-03 17:08:21 -05:00
1 parent f1641f2ffe
commit 274a9c0d2d
2 files changed
+12 -2

No files matched your search

@@ -321,7 +321,7 @@ dd_vacdiag() {
DD_ANTICHEAT_SETUP = """
dd_anticheat_runtime() {
local current=$1 name=$2 bridge=$3 library
if [ -n "$current" ] && [ -n "$(find "$current" -iname "$bridge" -print -quit 2>/dev/null)" ]; then
if [ -n "$current" ] && [ -n "$(find -L "$current" -iname "$bridge" -print -quit 2>/dev/null)" ]; then
printf '%s' "$current"; return 0
fi
while IFS= read -r library; do
@@ -1581,7 +1581,8 @@ def choose_default(steam_default, state, request, catalog, adopt_steam=True, app
wanted = requested_tool(request, catalog)
state["applied"] = seq
if wanted:
if wanted != state.get("default"):
if wanted != state.get("default") or (state.get("source") not in ("app", "steam") and any(
t["name"] == wanted and t.get("x86_64") for t in catalog)):
state.update(default=wanted, seq=now or now_ms(), source="app")
else:
print("steam-compatibility: the app asked for %s, which is not installed; kept %s" % (
@@ -227,6 +227,15 @@ class DroidDeckProtonDefaultTest(unittest.TestCase):
{"default": X86["name"], "written": X86["name"], "source": source}, [("0", X86["name"])], [VALVE, NEW, X86])
self.assertEqual((default, mapping), (X86["name"], {"0": X86["name"]}))
def test_a_request_for_the_automatic_x86_64_default_keeps_it(self):
default, mapping, state = self.run_default(
{"default": X86["name"], "written": X86["name"], "source": "update", "applied": 1}, [("0", X86["name"])],
[VALVE, NEW, X86], request={"seq": 2, "name": X86["name"]})
self.assertEqual((default, mapping, state["source"]), (X86["name"], {"0": X86["name"]}, "app"))
default, mapping, state = self.run_default(state, [("0", X86["name"])], [VALVE, NEW, X86],
request={"seq": 2, "name": X86["name"]})
self.assertEqual((default, mapping, state["source"]), (X86["name"], {"0": X86["name"]}, "app"))
def test_x86_64_layouts_are_marked_in_the_catalog(self):
with tempfile.TemporaryDirectory() as tmp:
tools = Path(tmp) / "compatibilitytools.d"