Add system option to disable process monitoring (Fixes #563)

This commit is contained in:
Mathieu Comandon 2017-05-29 20:23:35 -07:00
parent 06565d8428
commit 2a56439e25
2 changed files with 19 additions and 3 deletions

View file

@ -317,11 +317,16 @@ class Game(object):
env["LD_LIBRARY_PATH"] = ld_library_path
# /Env vars
monitoring_disabled = system_config.get('disable_monitoring')
process_watch = not monitoring_disabled
self.game_thread = LutrisThread(launch_arguments,
runner=self.runner, env=env,
runner=self.runner,
env=env,
rootpid=gameplay_info.get('rootpid'),
term=terminal, log_buffer=self.log_buffer)
watch=process_watch,
term=terminal,
log_buffer=self.log_buffer)
if hasattr(self.runner, 'stop'):
self.game_thread.set_stop_command(self.runner.stop)
self.game_thread.start()
@ -332,7 +337,10 @@ class Game(object):
if xboxdrv_config:
self.xboxdrv_start(xboxdrv_config)
self.heartbeat = GLib.timeout_add(HEARTBEAT_DELAY, self.beat)
if monitoring_disabled:
logger.info("Process monitoring disabled")
else:
self.heartbeat = GLib.timeout_add(HEARTBEAT_DELAY, self.beat)
def xboxdrv_start(self, config):
command = [

View file

@ -161,6 +161,14 @@ system_options = [
"game. Which can cause some incompatibilities in some cases. "
"Check this option to disable it.")
},
{
'option': 'disable_monitoring',
'label': "Disable process monitor",
'type': 'bool',
'default': False,
'advanced': True,
'help': "Disables process monitoring of games, Lutris won't detect when game quits."
},
{
'option': 'reset_pulse',
'type': 'bool',