1
0
Fork 0
mirror of synced 2024-05-24 06:19:55 +12:00

Lgndr: Validate default platform if it is coming from the config

This commit is contained in:
loathingKernel 2023-12-16 15:36:38 +02:00
parent 5f5e471169
commit 54ac89a85a
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD

View file

@ -55,7 +55,8 @@ class LegendaryCore(LegendaryCoreReal):
@property
def default_platform(self) -> str:
os_default = "Mac" if sys_platform == "darwin" else "Windows"
return self.lgd.config.get("Legendary", "default_platform", fallback=os_default)
usr_platform = self.lgd.config.get("Legendary", "default_platform", fallback=os_default)
return usr_platform if usr_platform in ("Windows", "Win32", "Mac") else os_default
# skip_sync defaults to false but since Rare is persistent, skip by default
# def get_installed_game(self, app_name, skip_sync=True) -> InstalledGame: