1
0
Fork 0
mirror of synced 2024-06-02 18:54:41 +12:00

RareGame: Update saves when a game exits

This commit is contained in:
loathingKernel 2023-03-11 01:32:04 +02:00
parent 3bacce78a2
commit fc015a4d30
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
2 changed files with 6 additions and 0 deletions

View file

@ -267,3 +267,7 @@ class RareGameSlim(RareGameBase):
if self.game.supports_mac_cloud_saves:
return self.game.metadata.get("customAttributes", {}).get('CloudSaveFolder_MAC', {}).get('value')
return ""
@property
def supports_cloud_saves(self):
return self.game.supports_cloud_saves or self.game.supports_mac_cloud_saves

View file

@ -111,6 +111,8 @@ class RareGame(RareGameSlim):
def __game_finished(self, exit_code: int):
if exit_code == GameProcess.Code.ON_STARTUP:
return
if self.supports_cloud_saves:
self.update_saves()
self.state = RareGame.State.IDLE
self.signals.game.finished.emit(self.app_name)