FriendsOfGalaxy / galaxy-integration-uplay

uplay integration with g2.0
MIT License
118 stars 20 forks source link

uplay is closed too quickly for sync #16

Open benjajb opened 3 years ago

benjajb commented 3 years ago

if the closing client feature is enabled, and a game is exited uplay is shutdown before it can sync saves.

I don't know if this is an integration or gog 2.0 issue so i reported it to both

FriendsOfGalaxy commented 3 years ago

Hi @benjajb,

yes, it looks like a problem.

When we send notification to Galaxy that the game is no longer running, and in Galaxy there is setting to "close external client", then shutdown_platform_client method is called.

We're using "taskkill /im upc.exe" command to tell Ubisoft client to close. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill This is basically calling WM_CLOSE signal - it is up to application to handle that.

We're not using /f force flag, but nevertheless looks like Ubisoft client does not support graceful shutdown with cloud saves this way.

Any help with discovering different method appreciated.

If there is no handler for any kind of external command, maybe the workaround would be to detect when cloud saves sync is finished. How? Maybe some cache change, or note in windows registry, or at least network inspection...

PR welcomed.

FriendsOfGalaxy commented 3 years ago

Quick research:

There is C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\savegames\

that contains

files, for example 57a84edf-09d7-448f-a18f-09c504b84637\3352\1.save.upload for Uno game.

EDIT ----

Looks like 1.save.upload file has gone after closing game and after cloud saves upload. In case when Galaxy closed the Uplay client, the file has stayed - so apparently not uploaded yet. That is nice.

FriendsOfGalaxy commented 3 years ago

If anyone wants help there is a list of questions/checks that need to be addresed before any coding: