mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
fix: Batman: Arkham City starts with full x87 precision under FEX (#792)
Arkham City (BatmanAC.exe) stopped with Unreal's "Fatal error!" about 1.5 s after start: an access violation in BatmanAC.exe right after steam.dll loads. The game leans on x87 and needs full precision under FEX (FEX wiki), while the default FEX preset sets FEX_X87REDUCEDPRECISION=1. Engine fixes sit above the shared preset and below the player's own game profile, so a fix keyed on BatmanAC.exe beside the started exe (BatmanAC.exe or BmLauncher.exe) restores x87 precision for this game only. Arkham Asylum, which shares BmLauncher.exe but not BatmanAC.exe, keeps the preset.
This commit is contained in:
1 parent
e45d6f7192
commit
7b018e6c42
2 files changed
+27
No files matched your search
@@ -173,6 +173,25 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
(other / "Other.exe").touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(other / "Other.exe"), []), ({}, [], []))
|
||||
|
||||
def test_arkham_city_gets_full_x87_precision_over_the_preset(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
city = Path(tmp) / "Batman Arkham City GOTY/Binaries/Win32"
|
||||
city.mkdir(parents=True)
|
||||
for name in ("BatmanAC.exe", "BmLauncher.exe"):
|
||||
(city / name).touch()
|
||||
for exe in ("BatmanAC.exe", "BmLauncher.exe"):
|
||||
env, extra, notes = MODULE["engine_fixes"](str(city / exe), [])
|
||||
self.assertEqual((env, extra), ({"FEX_X87REDUCEDPRECISION": "0"}, []))
|
||||
config = {"version": 1, "shared": {"FEX_X87REDUCEDPRECISION": "1"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "200260", env)["FEX_X87REDUCEDPRECISION"], "0")
|
||||
config["games"] = {"200260": {"FEX_X87REDUCEDPRECISION": "1"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "200260", env)["FEX_X87REDUCEDPRECISION"], "1")
|
||||
asylum = Path(tmp) / "Batman Arkham Asylum GOTY/Binaries"
|
||||
asylum.mkdir(parents=True)
|
||||
for name in ("ShippingPC-BmGame.exe", "BmLauncher.exe"):
|
||||
(asylum / name).touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(asylum / "BmLauncher.exe"), []), ({}, [], []))
|
||||
|
||||
def test_a_new_fix_only_needs_registering(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
(Path(tmp) / "Game.exe").touch()
|
||||
|
||||
Reference in new issue
Block a user