mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 21:35:59 +00:00
fix: turn off D3DGear's capture hook when it sits beside a game (#1627)
The Crew 2 loads D3DGear64.dll from its folder. Its DXGI Present hook faults over a thousand times within seconds under Wine and the game never presents again: black screen while the sound keeps playing. droiddeck-game-env now disables the DLL when it finds it beside the game, and DLL overrides from several engine fixes are kept together instead of the last one replacing the others.
This commit is contained in:
1 parent
a0a68f7280
commit
830c753312
2 files changed
+34
-1
No files matched your search
@@ -402,6 +402,27 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
(asylum / name).touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(asylum / "BmLauncher.exe"), []), ({}, [], []))
|
||||
|
||||
def test_d3dgear_capture_hook_beside_the_game_is_turned_off(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
game = Path(tmp) / "The Crew 2"
|
||||
game.mkdir()
|
||||
for name in ("TheCrew2.exe", "TheCrew2_BE.exe", "d3dgear64.dll"):
|
||||
(game / name).touch()
|
||||
env, extra, notes = MODULE["engine_fixes"](str(game / "TheCrew2.exe"), [])
|
||||
self.assertEqual((env, extra), ({"WINEDLLOVERRIDES": "d3dgear64=d"}, []))
|
||||
self.assertTrue(notes)
|
||||
(game / "d3dgear64.dll").rename(game / "D3DGear64.DLL")
|
||||
self.assertEqual(MODULE["engine_fixes"](str(game / "TheCrew2.exe"), [])[0], {"WINEDLLOVERRIDES": "d3dgear64=d"})
|
||||
(game / "D3DGear64.DLL").unlink()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(game / "TheCrew2.exe"), []), ({}, [], []))
|
||||
|
||||
def test_dll_overrides_from_several_fixes_are_all_kept(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
for name in ("Game.exe", "Game.pck", "GodotSharp.dll", "libsentry.windows.release.x86_64.dll", "d3dgear64.dll"):
|
||||
(Path(tmp) / name).touch()
|
||||
env = MODULE["engine_fixes"](str(Path(tmp) / "Game.exe"), [])[0]
|
||||
self.assertEqual(env["WINEDLLOVERRIDES"], "libsentry.windows.release.x86_64=d;d3dgear64=d")
|
||||
|
||||
def test_black_ops_iii_and_dark_souls_remastered_skip_protonfixes(self):
|
||||
for exe in ("/game/Call of Duty Black Ops III/BlackOps3.exe", "/game/DARK SOULS REMASTERED/DarkSoulsRemastered.exe"):
|
||||
env, extra, notes = MODULE["engine_fixes"](exe, [])
|
||||
|
||||
Reference in new issue
Block a user