mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 02:51:10 +00:00
fix: avoid unsupported ray tracing on Stellar Blade startup
This commit is contained in:
1 parent
ca0689d254
commit
0bb8384c76
2 files changed
+34
No files matched your search
@@ -171,6 +171,15 @@ def reskate_feature_level(game):
|
||||
return {"VKD3D_FEATURE_LEVEL": "12_1"}, [], "ReSkate (skate.): D3D12 feature level 12_1"
|
||||
|
||||
|
||||
@fix
|
||||
def stellar_blade_feature_level(game):
|
||||
if game.stem == "sb-win64-shipping" or (
|
||||
"sb.exe" in game.files
|
||||
and os.path.isfile(os.path.join(os.path.dirname(game.exe), "SB", "Binaries", "Win64", "SB-Win64-Shipping.exe"))
|
||||
):
|
||||
return {"VKD3D_FEATURE_LEVEL": None}, [], "Stellar Blade: use the driver's D3D12 feature level (12_2 advertises unsupported ray tracing)"
|
||||
|
||||
|
||||
@fix
|
||||
def cyberpunk_feature_level(game):
|
||||
if game.stem == "cyberpunk2077" or (
|
||||
|
||||
@@ -1190,6 +1190,31 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
(skate / name).touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(skate / "EAAntiCheat.GameServiceLauncher.exe"), [])[:2], ({}, []))
|
||||
|
||||
def test_stellar_blade_uses_detected_feature_level_without_overriding_game_settings(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
root = Path(tmp) / "StellarBlade"
|
||||
shipping = root / "SB/Binaries/Win64/SB-Win64-Shipping.exe"
|
||||
shipping.parent.mkdir(parents=True)
|
||||
shipping.touch()
|
||||
(root / "SB.exe").touch()
|
||||
config = {"version": 1, "shared": {"VKD3D_FEATURE_LEVEL": "12_2"}}
|
||||
for exe in (root / "SB.exe", root / ".droiddeck-launch.bat", shipping):
|
||||
env, extra, notes = MODULE["engine_fixes"](str(exe), [])
|
||||
self.assertEqual((env, extra), ({"VKD3D_FEATURE_LEVEL": None}, []), exe)
|
||||
self.assertTrue(notes)
|
||||
inherited = {"VKD3D_FEATURE_LEVEL": "12_2", "KEEP": "unchanged"}
|
||||
effective = MODULE["apply_config"](inherited, config, "3489700", env)
|
||||
self.assertNotIn("VKD3D_FEATURE_LEVEL", effective)
|
||||
self.assertEqual(effective["KEEP"], "unchanged")
|
||||
for value in ("12_1", "12_2", None):
|
||||
explicit = dict(config, games={"3489700": {"VKD3D_FEATURE_LEVEL": value}})
|
||||
actual = MODULE["apply_config"](inherited, explicit, "3489700", env)
|
||||
self.assertEqual(actual.get("VKD3D_FEATURE_LEVEL"), value)
|
||||
other = Path(tmp) / "Other"
|
||||
other.mkdir()
|
||||
(other / "SB.exe").touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(other / "SB.exe"), []), ({}, [], []))
|
||||
|
||||
def test_caravan_sandwitch_robocop_and_cyberpunk_run_at_feature_level_12_1(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
caravan = Path(tmp) / "Caravan SandWitch"
|
||||
|
||||
Reference in new issue
Block a user