diff --git a/lutris/game.py b/lutris/game.py index 4f21b74df..fad31ce7e 100644 --- a/lutris/game.py +++ b/lutris/game.py @@ -384,6 +384,12 @@ class Game(GObject.Object): self.emit("game-updated") def save_lastplayed(self): + """Save only the platform field- do not restore any other values the user may have changed + in another window.""" + games_db.update_existing(id=self.id, slug=self.slug, platform=self.platform) + self.emit("game-updated") + + def save_platform(self): """Save only the lastplayed field- do not restore any other values the user may have changed in another window.""" games_db.update_existing(id=self.id, slug=self.slug, lastplayed=self.lastplayed) diff --git a/lutris/gui/config/common.py b/lutris/gui/config/common.py index c03fbc329..4ca264ddb 100644 --- a/lutris/gui/config/common.py +++ b/lutris/gui/config/common.py @@ -573,7 +573,7 @@ class GameDialogCommon(ModelessDialog, DialogInstallUIDelegate): self.game.runner_name = self.runner_name self.game.is_installed = True self.game.config = self.lutris_config - self.game.save(save_config=True) + self.game.save() self.destroy() self.saved = True return True diff --git a/lutris/startup.py b/lutris/startup.py index 489d8a026..bd9a61f0b 100644 --- a/lutris/startup.py +++ b/lutris/startup.py @@ -147,7 +147,7 @@ def fill_missing_platforms(): game.set_platform_from_runner() if game.platform: logger.info("Platform for %s set to %s", game.name, game.platform) - game.save(save_config=False) + game.save_platform() def run_all_checks():