diff --git a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility index 8e3ce88f42..6a34e90f6a 100755 --- a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility +++ b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility @@ -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" % ( diff --git a/tools/tests/test_droiddeck_proton_default.py b/tools/tests/test_droiddeck_proton_default.py index 64a5e3c02e..194bf022c9 100644 --- a/tools/tests/test_droiddeck_proton_default.py +++ b/tools/tests/test_droiddeck_proton_default.py @@ -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"