mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Add system option to disable process monitoring (Fixes #563)
This commit is contained in:
parent
06565d8428
commit
2a56439e25
|
@ -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 = [
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue