Update get_command code for Proton

This commit is contained in:
Mathieu Comandon 2024-03-01 02:26:20 -08:00
parent 01765e1b6f
commit 82b44a4cc2

View file

@ -1173,8 +1173,11 @@ class wine(Runner):
def get_command(self):
exe = self.get_executable()
ulwgl_path = system.find_executable("ulwgl-run")
if "Proton" in exe and "lutris" not in exe and ulwgl_path:
return [ulwgl_path]
if proton.is_proton_path(exe):
ulwgl_path = proton.get_ulwgl_path()
if ulwgl_path:
return [ulwgl_path]
raise MissingExecutableError("Install ULWGL to use Proton")
return super().get_command()
def play(self): # pylint: disable=too-many-return-statements # noqa: C901