Skip to content

Commit f1207d6

Browse files
nimbiceclaude
andauthored
Witcher 3: accept DX12-only (next-gen) installs (#237)
Current Steam builds can ship only bin/x64_dx12/witcher3.exe without bin/x64/, which made looksValid() reject the install. Fall back to the DX12 executable when the DX11 one is missing. Co-authored-by: nimbice <5924799+nimbice@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3bd9da9 commit f1207d6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎games/game_witcher3.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class Witcher3Game(BasicGame):
2727
GameSteamId = [499450, 292030]
2828
GameGogId = [1640424747, 1495134320, 1207664663, 1207664643]
2929
GameBinary = "bin/x64/witcher3.exe"
30+
# Next-gen installs may ship only the DX12 build (no bin/x64).
31+
_DX12_BINARY = "bin/x64_dx12/witcher3.exe"
3032
GameDataPath = "Mods"
3133
GameSaveExtension = "sav"
3234
GameDocumentsDirectory = "%DOCUMENTS%/The Witcher 3"
@@ -41,6 +43,15 @@ def init(self, organizer: mobase.IOrganizer):
4143
self._register_feature(BasicGameSaveGameInfo(lambda s: s.with_suffix(".png")))
4244
return True
4345

46+
def binaryName(self) -> str:
47+
game_dir = self.gameDirectory()
48+
if not game_dir.exists(self.GameBinary) and game_dir.exists(self._DX12_BINARY):
49+
return self._DX12_BINARY
50+
return super().binaryName()
51+
52+
def looksValid(self, directory: QDir):
53+
return directory.exists(self.GameBinary) or directory.exists(self._DX12_BINARY)
54+
4455
def iniFiles(self):
4556
return ["user.settings", "input.settings"]
4657

0 commit comments

Comments
 (0)