mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
Add checks to not apply "gpu" setting if it would be disabled.
This commit is contained in:
parent
8bda741ce2
commit
7ae13cea67
|
@ -125,7 +125,7 @@ def get_gamescope_args(launch_arguments, system_config):
|
|||
launch_arguments.insert(0, "-h")
|
||||
launch_arguments.insert(0, game_width)
|
||||
launch_arguments.insert(0, "-w")
|
||||
if system_config.get("gpu"):
|
||||
if system_config.get("gpu") and len(GPUS) > 1:
|
||||
gpu = GPUS[system_config["gpu"]]
|
||||
launch_arguments.insert(0, gpu.pci_id)
|
||||
launch_arguments.insert(0, "--prefer-vk-device")
|
||||
|
|
|
@ -235,7 +235,7 @@ class Runner: # pylint: disable=too-many-public-methods
|
|||
if sdl_video_fullscreen and sdl_video_fullscreen != "off":
|
||||
env["SDL_VIDEO_FULLSCREEN_DISPLAY"] = sdl_video_fullscreen
|
||||
|
||||
if self.system_config.get("gpu"):
|
||||
if self.system_config.get("gpu") and len(GPUS) > 1:
|
||||
gpu = GPUS[self.system_config["gpu"]]
|
||||
if gpu.driver == "nvidia":
|
||||
env["DRI_PRIME"] = "1"
|
||||
|
@ -245,7 +245,7 @@ class Runner: # pylint: disable=too-many-public-methods
|
|||
else:
|
||||
env["DRI_PRIME"] = gpu.pci_id
|
||||
env["VK_ICD_FILENAMES"] = gpu.icd_files # Deprecated
|
||||
env["VK_DRIVER_FILES"] = gpu.icd_files # Current form
|
||||
env["VK_DRIVER_FILES"] = gpu.icd_files # Current form
|
||||
|
||||
# Set PulseAudio latency to 60ms
|
||||
if self.system_config.get("pulse_latency"):
|
||||
|
|
Loading…
Reference in a new issue