Skip to content

Commit

Permalink
Add system option to disable runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
strycore committed Dec 15, 2014
1 parent 40dd5ad commit ee17170
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lutris/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ def prelaunch(self):
return self.runner.prelaunch()
return True

def use_runtime(self, system_config):
disable_runtime = system_config.get('disable_runtime')
env_runtime = os.getenv('LUTRIS_RUNTIME')
if env_runtime and env_runtime.lower() in ('0', 'off'):
disable_runtime = True
return not disable_runtime

def play(self):
"""Launch the game."""
if not self.runner:
Expand Down Expand Up @@ -145,7 +152,7 @@ def play(self):
launch_arguments.insert(0, 'LD_PRELOAD="{}"'.format(ld_preload))

ld_library_path = []
if os.getenv("LUTRIS_RUNTIME", 1) == 1:
if self.use_runtime(system_config):
runtime64_path = os.path.join(settings.RUNTIME_DIR, "lib64")
if os.path.exists(runtime64_path):
ld_library_path.append(runtime64_path)
Expand Down
9 changes: 9 additions & 0 deletions lutris/sysoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
"Lutris uses it to propose you a default path when you \n"
"install a new game.")
},
{
'option': 'disable_runtime',
'type': 'bool',
'label': 'Disable Lutris Runtime',
'default': False,
'help': ("The Lutris Runtime loads some libraries before running the "
"game. Which can cause some conflicts in some cases (mostly "
"with Steam). Check this option to diasble it.")
},
{
'option': 'resolution',
'type': 'choice',
Expand Down

0 comments on commit ee17170

Please sign in to comment.