Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save Overwrite local failsave #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

J65043
Copy link

@J65043 J65043 commented Jan 7, 2025

This is my idea of a save overwrite failsafe for local.

its very rough and I am unable to finish it because of my lack of rust knowledge and time.

  • we use a command line arg to specify if we want the failsafe so something such as --failsafe.
  • normally the failsafe will use the gui to make selections or command line to make selections
  • we want this to be steamdeck compatible/hook into decky ludusavi for native gui so we will..
    • have a potential -steamdeck option or use -api
    • specific command line argument will make the command respond with a json .
    • Deckyludusavi will interpret that json, present a gui to user and then run a command another command with either -Y or -N based on user input
    • If we ran restore --failsafe and had a save conflict. and we want to keep the save. Decky will present a gui after interpreting the json from the restore command. We will select no to restoring the save on the gui. Decky will then run restore --failsafe -N and proceed.
    • This is more specifically for the wrap command but it is also used for the restore command.
      • more specifically I will use this when I implement native wrapping to decky ludusavi so wrapping works properly in gamemode.

@mtkennerly
Copy link
Owner

Hi! Thanks for your PR. As we discussed on Discord, I'll look into refactoring this and fleshing it out. I think some of this logic probably belongs in a lower level, and there may be some overlap with #436 to use the same system to ask the user what they want to do when there's a cloud conflict.

if local_size > backup_size || local_modified_time_utc > backup_modified_time

Checking the modified time makes sense, but I don't think size is a good indicator here. For example, if the game stores multiple save slots in one file, and you delete a slot, then the file would probably get smaller even though it's newer.

hook into decky ludusavi for native gui

Based on that one Discord conversation you had linked me to, the current GTK dialogs do work on Steam Deck (even for non-Steam shortcuts, as long as you use the absolute path to Ludusavi, apparently), so I don't really understand what you're trying to solve. If the issue is that backup and restore don't have --gui flags, those will be added in the next release. Could you please elaborate on the problem?

Deckyludusavi will interpret that json, present a gui to user and then run a command another command with either -Y or -N based on user input

Splitting the commands up into resumable/stateful pieces would significantly increase the complexity, so I'm not open to that. If --gui really doesn't work for you even with the workarounds from the Discord thread (please double check and make sure to try them, including with the absolute path), then we can explore some other options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants