mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Display error dialog when game misses shared library
This commit is contained in:
parent
ef95c2edfa
commit
2bc4ec5144
|
@ -288,3 +288,18 @@ class Game(object):
|
|||
|
||||
if self.game_thread:
|
||||
self.game_thread.stop()
|
||||
self.process_return_codes()
|
||||
|
||||
def process_return_codes(self):
|
||||
"""Do things depending on how the game quitted."""
|
||||
# If missing shared library
|
||||
if self.game_thread.return_code == 127:
|
||||
error_string = ''
|
||||
output_lines = self.game_thread.stdout.split('\n')
|
||||
for line in output_lines:
|
||||
if "error while loading shared lib" in line:
|
||||
error_string = line
|
||||
if error_string:
|
||||
dialogs.ErrorDialog("<b>Error: Missing shared library.</b>"
|
||||
"\n\n%s" % error_string)
|
||||
|
||||
|
|
Loading…
Reference in a new issue