diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py index ff49b7994..01d29879f 100644 --- a/lutris/gui/lutriswindow.py +++ b/lutris/gui/lutriswindow.py @@ -32,6 +32,7 @@ from lutris.scanners.lutris import add_to_path_cache, get_missing_game_ids, remo from lutris.services.base import BaseService from lutris.services.lutris import LutrisService from lutris.util import datapath +from lutris.util.jobs import AsyncCall from lutris.util.log import logger from lutris.util.system import update_desktop_icons from lutris.util.wine.wine import esync_display_limit_warning, fsync_display_support_warning @@ -248,7 +249,7 @@ class LutrisWindow(Gtk.ApplicationWindow, def on_load(self, widget, data=None): """Finish initializing the view""" self._bind_zoom_adjustment() - self.get_missing_games() + AsyncCall(get_missing_game_ids, self.on_get_missing_game_ids) self.current_view.grab_focus() def on_sidebar_realize(self, widget, data=None): @@ -414,8 +415,15 @@ class LutrisWindow(Gtk.ApplicationWindow, """Return a list of currently running games""" return games_db.get_games_by_ids([game.id for game in self.application.running_games]) - def get_missing_games(self): - missing_ids = get_missing_game_ids() + def on_get_missing_game_ids(self, missing_ids, error): + if error: + logger.error(str(error)) + return + self.get_missing_games(missing_ids) + + def get_missing_games(self, missing_ids:list=None) -> list: + if missing_ids is None: + missing_ids = get_missing_game_ids() missing_games = games_db.get_games_by_ids(missing_ids) if missing_games: self.sidebar.missing_row.show() diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index 28498e71c..1a379b9ca 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -88,7 +88,6 @@ def _get_simple_vulkan_support_error(config, option_key, feature): if not LINUX_SYSTEM.is_vulkan_supported(): return _("Error Vulkan is not installed or is not supported by your system, " "so %s is not available.") % feature - return None