mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix(game-env): turn on FEX x87 FIP emulation for the SecuROM racing title that needs it (#3092)
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
This commit is contained in:
1 parent
01dc415f10
commit
8f4cefd3bd
2 files changed
+26
No files matched your search
@@ -182,6 +182,11 @@ def arkham_city_x87(game):
|
||||
return {"FEX_X87REDUCEDPRECISION": "0"}, [], "Batman: Arkham City: FEX with full x87 precision"
|
||||
|
||||
|
||||
@fix
|
||||
def split_second_x87_fip(game):
|
||||
if game.app_id == "297860" or game.stem == "splitsecond":
|
||||
return {"FEX_JITFEATURES": "enablex87fip"}, [], "Split/Second: FEX x87 FIP emulation on (its SecuROM stops with error 8016 without it)"
|
||||
|
||||
|
||||
@fix
|
||||
def doom_2016_swapchain_images(game):
|
||||
|
||||
@@ -1627,6 +1627,27 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
(asylum / name).touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(asylum / "BmLauncher.exe"), []), ({}, [], []))
|
||||
|
||||
def test_split_second_gets_x87_fip_unless_the_game_sets_jit_features(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
game = Path(tmp) / "SplitSecond"
|
||||
game.mkdir()
|
||||
exe = game / "SplitSecond.exe"
|
||||
exe.touch()
|
||||
for app_id in ("297860", ""):
|
||||
env, extra, notes = MODULE["engine_fixes"](str(exe), [], app_id)
|
||||
self.assertEqual((env, extra), ({"FEX_JITFEATURES": "enablex87fip"}, []))
|
||||
self.assertTrue(notes)
|
||||
other = Path(tmp) / "Other/Game.exe"
|
||||
other.parent.mkdir()
|
||||
other.touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(other), [], "297860")[0], {"FEX_JITFEATURES": "enablex87fip"})
|
||||
self.assertEqual(MODULE["engine_fixes"](str(other), [], "42"), ({}, [], []))
|
||||
config = {"version": 1, "shared": {"FEX_X87REDUCEDPRECISION": "1"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "297860", env),
|
||||
{"FEX_X87REDUCEDPRECISION": "1", "FEX_JITFEATURES": "enablex87fip"})
|
||||
config["games"] = {"297860": {"FEX_JITFEATURES": "off"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "297860", env)["FEX_JITFEATURES"], "off")
|
||||
|
||||
def test_d3dgear_capture_hook_beside_the_game_is_turned_off(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
game = Path(tmp) / "The Crew 2"
|
||||
|
||||
Reference in new issue
Block a user