diff --git a/legendary/cli.py b/legendary/cli.py index a5a31b3..55333fe 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -839,6 +839,7 @@ def main(): launch_parser.add_argument('--language', dest='language', action='store', metavar='', help='Override language for game launch (defaults to system settings)') launch_parser.add_argument('--wrapper', dest='wrapper', action='store', metavar='', + default=os.environ.get('LGDRY_WRAPPER', None), help='Wrapper command to launch game with') if os.name != 'nt': diff --git a/legendary/core.py b/legendary/core.py index ed127a0..f850635 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -253,7 +253,7 @@ class LegendaryCore: params = [] - if wrapper := self.lgd.config.get(app_name, 'wrapper', fallback=wrapper): + if wrapper or (wrapper := self.lgd.config.get(app_name, 'wrapper')): params.extend(shlex.split(wrapper)) if os.name != 'nt' and not disable_wine: