mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix(steam): default listed titles with a bundled arm64 Linux build to FEX
Steamworks has no arm64 launch-option architecture, so a title that ships x64 and arm64 Linux builds side by side still reads as osarch 64 and gets the Proton ARM64 default. List such titles in FEX_DEFAULT_APPS so they default to Linux x86 (FEX), whose launch runs the bundled arm64 build. A player's own pick is kept, and unlisted titles are unchanged. Refs #1774
This commit is contained in:
1 parent
ee0d8d9997
commit
28d4f58f33
2 files changed
+28
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user