mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Allow default env/wine overrides in config
This commit is contained in:
parent
92a0003e6f
commit
c2ae5b7367
|
@ -206,7 +206,11 @@ class LegendaryCore:
|
|||
params = []
|
||||
|
||||
if os.name != 'nt':
|
||||
params.append(self.lgd.config.get(app_name, 'wine_executable', fallback='wine'))
|
||||
# check if there's a default override
|
||||
wine_binary = self.lgd.config.get('default', 'wine_executable', fallback='wine')
|
||||
# check if there's a game specific override
|
||||
wine_binary = self.lgd.config.get(app_name, 'wine_executable', fallback=wine_binary)
|
||||
params.append(wine_binary)
|
||||
|
||||
params.append(game_exe)
|
||||
|
||||
|
@ -247,6 +251,8 @@ class LegendaryCore:
|
|||
env = None
|
||||
if f'{app_name}.env' in self.lgd.config:
|
||||
env = dict(self.lgd.config[f'{app_name}.env'])
|
||||
elif 'default.env' in self.lgd.config:
|
||||
env = dict(self.lgd.config['default.env'])
|
||||
|
||||
return params, working_dir, env
|
||||
|
||||
|
|
Loading…
Reference in a new issue