Compare commits

..

No commits in common. "94582f15472296762a556d10af0037384a395a1d" and "0998d0a65551f50b22e7de871085c6fa5c9512a5" have entirely different histories.

5 changed files with 15 additions and 26 deletions

View File

@ -134,12 +134,8 @@ class BaldursGate3Game(ProtonGame):
return overlays
@property
def game_executables(self) -> list[Path]:
# Handle both the Dx11 version and the Vulkan version.
return [
self.installation_path / "bin" / "bg3_dx11.exe",
self.installation_path / "bin" / "bg3.exe",
]
def game_executable(self) -> Path:
return self.installation_path / "bin" / "bg3.exe"
def to_dict(self) -> dict[str, Any]:
return {

View File

@ -91,7 +91,7 @@ class ProtonGame(Game, abc.ABC):
raise NotImplementedError()
@property
def game_executables(self) -> list[Path]:
def game_executable(self) -> Path:
raise NotImplementedError()
@property
@ -101,10 +101,9 @@ class ProtonGame(Game, abc.ABC):
def wait(self):
# Wait until we started the game.
proc = Path("/proc")
windows_paths = [str(executable).replace("/", "\\") for executable in self.game_executables]
wine_exe_paths = [f"Z:{windows_path}" for windows_path in windows_paths]
executables = [str(exe) for exe in self.game_executables]
print(wine_exe_paths)
windows_path = str(self.game_executable).replace("/", "\\")
wine_exe_path = f"Z:{windows_path}"
print(wine_exe_path)
print("Polling for game process...")
while True:
for dir in os.listdir(proc):
@ -128,9 +127,9 @@ class ProtonGame(Game, abc.ABC):
abs_cmdline = os.path.abspath(cmdline).replace("\x00", "")
if (
any(cmdline.startswith(wine_exe_path) for wine_exe_path in wine_exe_paths)
or abs_cmdline in executables
or any(abs_cmdline.startswith(exe) for exe in executables)
cmdline.startswith(wine_exe_path)
or abs_cmdline == str(self.game_executable)
or abs_cmdline.startswith(str(self.game_executable))
):
self._pid = dir
break

View File

@ -35,10 +35,8 @@ class LethalCompanyGame(ProtonGame):
)
@property
def game_executables(self) -> list[Path]:
return [
self.installation_path / "Lethal Company.exe",
]
def game_executable(self) -> Path:
return self.installation_path / "Lethal Company.exe"
def prepare_overlays(
self, profile: LethalCompanyProfile

View File

@ -35,10 +35,8 @@ class ProjectDivaMegaMixGame(ProtonGame):
)
@property
def game_executables(self) -> list[Path]:
return [
self.installation_path / "DivaMegaMix.exe",
]
def game_executable(self) -> Path:
return self.installation_path / "DivaMegaMix.exe"
def prepare_overlays(
self, profile: ProjectDivaMegaMixProfile

View File

@ -46,10 +46,8 @@ class ReadyOrNotGame(ProtonGame):
]
@property
def game_executables(self) -> list[Path]:
return [
self.installation_path / "ReadyOrNot.exe",
]
def game_executable(self) -> Path:
return self.installation_path / "ReadyOrNot.exe"
def to_dict(self) -> dict[str, Any]:
return {