[core] Final adjustments to default path, separate config option for Mac

This commit is contained in:
derrod 2022-01-07 13:51:25 +01:00
parent 6c3f409c49
commit cf8bccc569

View file

@ -1472,13 +1472,9 @@ class LegendaryCore:
def get_default_install_dir(self, platform='Windows'): def get_default_install_dir(self, platform='Windows'):
if platform == 'Mac': if platform == 'Mac':
_fallback = '~/Applications' return os.path.expanduser(self.lgd.config.get('Legendary', 'mac_install_dir', fallback='~/Applications'))
elif os.name == 'nt':
_fallback = '~/legendary'
else: else:
_fallback = '~/Games/legendary' return os.path.expanduser(self.lgd.config.get('Legendary', 'install_dir', fallback='~/Games'))
return os.path.expanduser(self.lgd.config.get('Legendary', 'install_dir', fallback=_fallback))
def install_game(self, installed_game: InstalledGame) -> dict: def install_game(self, installed_game: InstalledGame) -> dict:
if self.egl_sync_enabled and not installed_game.is_dlc and installed_game.platform.startswith('Win'): if self.egl_sync_enabled and not installed_game.is_dlc and installed_game.platform.startswith('Win'):