mirror of
https://github.com/lutris/lutris
synced 2024-10-06 07:50:16 +00:00
Set ready state in the game thread based on Steam status (Fixes #658)
This commit is contained in:
parent
aa0b66f42d
commit
dfb05cb30e
|
@ -446,5 +446,9 @@ class Game(object):
|
|||
"already using the same Wine prefix.</b>")
|
||||
|
||||
def notify_steam_game_changed(self, appmanifest):
|
||||
logger.debug(appmanifest)
|
||||
logger.debug(appmanifest.states)
|
||||
logger.debug("Steam game %s state has changed, new states: %s",
|
||||
appmanifest.steamid, ', '.join(appmanifest.states))
|
||||
if 'Fully Installed' in appmanifest.states:
|
||||
self.game_thread.ready_state = True
|
||||
elif 'Update Required' in appmanifest.states:
|
||||
self.game_thread.ready_state = False
|
||||
|
|
|
@ -41,6 +41,7 @@ class LutrisThread(threading.Thread):
|
|||
watch=True, cwd=None, include_processes=[], exclude_processes=[], log_buffer=None):
|
||||
"""Thread init"""
|
||||
threading.Thread.__init__(self)
|
||||
self.ready_state = True
|
||||
self.env = env
|
||||
self.original_env = {}
|
||||
self.command = command
|
||||
|
@ -286,6 +287,11 @@ class LutrisThread(threading.Thread):
|
|||
if not self.game_process or not self.is_running:
|
||||
logger.error('No game process available')
|
||||
return False
|
||||
|
||||
if not self.ready_state:
|
||||
self.cycles_without_children = 0
|
||||
return True
|
||||
|
||||
processes, num_children, num_watched_children, terminated_children = self.get_processes()
|
||||
|
||||
if processes != self.monitored_processes:
|
||||
|
|
Loading…
Reference in a new issue