[core] Allow "wrapper" and "no_wine" in "default" section

The entire config crap will have to be rewritten to be "nicer"...
This commit is contained in:
derrod 2020-09-08 04:56:56 +02:00
parent acb7476a22
commit d4f4571f85

View file

@ -316,7 +316,9 @@ class LegendaryCore:
params = []
if wrapper or (wrapper := self.lgd.config.get(app_name, 'wrapper', fallback=None)):
if wrapper or (wrapper := self.lgd.config.get(app_name, 'wrapper',
fallback=self.lgd.config.get('default', 'wrapper',
fallback=None))):
params.extend(shlex.split(wrapper))
if os.name != 'nt' and not disable_wine:
@ -326,7 +328,8 @@ class LegendaryCore:
# check if there's a game specific override
wine_bin = self.lgd.config.get(app_name, 'wine_executable', fallback=wine_bin)
if not self.lgd.config.getboolean(app_name, 'no_wine', fallback=False):
if not self.lgd.config.getboolean(app_name, 'no_wine',
fallback=self.lgd.config.get('default', 'no_wine', fallback=False)):
params.append(wine_bin)
params.append(game_exe)