diff --git a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility index acacb0e17d..f3181b608e 100755 --- a/tools/linuxfs/overlay/usr/local/bin/steam-compatibility +++ b/tools/linuxfs/overlay/usr/local/bin/steam-compatibility @@ -24,6 +24,9 @@ SNIPER_APPID = "1628350" SLR4_APPID = "4183110" FEX_DEPENDENCIES = (FEX_APPID, SNIPER_APPID, SLR4_APPID) REQUIRED_TOOLS = (PROTON_ARM64_APPID,) + FEX_DEPENDENCIES +# Linux builds that bundle an arm64 binary their launcher starts; Steamworks offers no arm64 +# launch-option architecture, so appinfo cannot say so (#1774). +FEX_DEFAULT_APPS = frozenset({"4385780"}) FULLY_INSTALLED = 4 UPDATE_REQUIRED = 2 REQUEST_HANDOFF_SECONDS = 30 @@ -930,7 +933,7 @@ def native_targets(steam_root, apps): if "arm64" in osarch or "aarch64" in osarch: targets[app] = None continue - if "windows" in oslist: + if "windows" in oslist and app not in FEX_DEFAULT_APPS: targets[app] = NATIVE_CHOICE continue targets[app] = FEX_TOOL diff --git a/tools/tests/test_game_environment.py b/tools/tests/test_game_environment.py index 55387436b9..36178ab610 100644 --- a/tools/tests/test_game_environment.py +++ b/tools/tests/test_game_environment.py @@ -1658,6 +1658,30 @@ class ProtonDefaultTest(unittest.TestCase): finally: globals_["native_targets"] = original_native_targets + def test_a_listed_title_with_a_bundled_arm64_linux_build_defaults_to_fex(self): + globals_ = COMPAT["native_targets"].__globals__ + original_platforms = globals_["appinfo_platforms"] + globals_["appinfo_platforms"] = lambda _path, wanted: { + app: ({"linux", "windows"}, "64", "game") for app in ("4385780", "42") if app in wanted + } + try: + native = COMPAT["native_targets"]("/nonexistent", ["4385780", "42"]) + finally: + globals_["appinfo_platforms"] = original_platforms + self.assertEqual(native["4385780"], COMPAT["FEX_TOOL"]) + self.assertIs(native["42"], COMPAT["NATIVE_CHOICE"]) + + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL}, ["4385780"], self.NAMES, self.TOOL, {}, native) + self.assertEqual(changes, {"4385780": COMPAT["FEX_TOOL"]}) + self.assertEqual(auto, {"4385780": COMPAT["FEX_TOOL"]}) + + for choice in (self.TOOL, "GE-Proton11-7"): + changes, auto = COMPAT["plan_mapping"]( + {"0": self.TOOL, "4385780": choice}, ["4385780"], self.NAMES, self.TOOL, {}, native) + self.assertEqual(changes, {}) + self.assertEqual(auto, {}) + def test_factorio_preserves_an_observed_native_choice_despite_ambiguous_metadata(self): with tempfile.TemporaryDirectory() as tmp: steam = Path(tmp) / "Steam"