Repository navigation
Conversation
Settings > System > Saves on the start screen: - Export saves: every save (vanilla and each seed's, with the seed files they need) in one .zip laid out like the data folder. Never game files. - Import saves: every save in the file is checked (size, version, both CRCs); each game can be picked; the saves it replaces are zipped into backups/ first; each slot is written as working copies and renamed in place, the save first, so a save and its .flagsx always match. - Sync folder: a folder the player picks on each device (iCloud Drive, a cloud drive folder, any folder on Android through the system picker). After each save the slots are merged into one bundle there, newer slot wins; newer saves found there are offered at the start. - Saves folder: opens the data folder (not on Android). Platforms: desktop file dialogs; iOS document pickers and an export picker, the sync folder kept by bookmark, reads and writes through NSFileCoordinator (also on macOS); Android ACTION_OPEN_DOCUMENT, ACTION_CREATE_DOCUMENT and a persisted ACTION_OPEN_DOCUMENT_TREE folder, read and written through the storage framework. The Android request in issue 892. miniz is now built on every platform (Android and the iOS app too). tools/test_saves.c covers the bundle and the sync merge without game data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sync folder gets its own design pass and branch. This leaves Export saves, Import saves and Saves folder. The full sync code is in 47cf20b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- No limit on games: the bundle and data folder lists grow as needed (was 64,
dropped silently); the import list scrolls when long.
- A seed import that fails or was cut off leaves no rando/<seed>.import behind
(the rando tab skips such folders too).
- Slot import in fs.c's commit order: stale working copies cleared, old
sidecars removed before the save is renamed, sidecar working copies kept once
the save is in place; folders flushed after renames, _commit on Windows.
- Names Windows reads differently (':', trailing dot or space, device names)
are left out.
- A seed here and in the file must both have the same id, or neither.
- Android CMake fetches miniz with CMake itself (no bash).
- Android's picked copy is removed after use; backups pruned oldest first
within one second; desktop export never replaces <name>.zip unasked; the iOS
export picker can't be swiped away.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Old slot files the bundle lacks are set aside (<file>.import) and removed only after the save is replaced, so an old save never loses its sidecars. - saves_recover (start screen, and each import before its backup) puts set-aside files back or removes them and finishes a .flagsx.pending whose save was already renamed, as fs.c's mount does. - A sidecar rename failing after the save is in place no longer reports the import as failed; its working copy is finished later. - Seeds named like Windows devices export everywhere and show as not importable on Windows (new string, all languages); the rando tab no longer makes such names. - The partly read list is freed when the manifest can't be read; the launcher's seed list skips .import folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game started without the start screen (--play, --load-save, a ready --game-files) mounted a slot before saves_recover ran: the old save's set-aside sidecars were lost. fs.c's mount now runs saves_finish_dir before it drops working copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Saves section to Settings > System on the start screen: Export saves, Import saves and Saves folder.
What it does
lasrecomp-saves.txt(format, app version, game version, when each slot was saved). Game files are never included: a seed'sromfs/is left out.backups/first (the last 20 are kept). Each slot is written as.pendingworking copies, old sidecars the file doesn't have are set aside, then the save is renamed into place, the set-aside files removed and its sidecars renamed after it, with the folder flushed to disk: the same order asfs.c's commit. A save never pairs with an old.flagsx, and an old save never loses its own. A cut-off import or game save is made whole before its folder is read again: every save mount does it (so a game started without the start screen too), the start screen does it for every folder, and each import does it before its backup. A seed is written torando/<seed>.importand renamed into place; a failed or cut-off one is removed. Names Windows would read differently (a:, a trailing dot or space) are left out. A seed named like a Windows device (con,com1) exports everywhere and shows as not importable on Windows; the rando tab no longer makes such names. It runs on the start screen only, where no save is open.A sync folder was in the first version of this PR. It is split out for its own design pass and will come as a separate PR (the code is kept in 47cf20b).
Platforms
initForExportingURLs).ACTION_OPEN_DOCUMENTto import andACTION_CREATE_DOCUMENTto export. This covers the Android request in issue 892 without All files access. Saves can go to Documents or Downloads, which a PC can see over USB.zipfile.cand miniz. Android's CMake fetches the same pinned release with its own download and unzip (no bash needed). The notices now list Android.Text
New strings are translated in all 11 tables (one appended block each).
Tested
tools/test_saves.c(new, no game data), all passing on macOS:.pending, noromfs/, unplayed seeds left out)../), a different seed with the same name, a newer format, a file that isn't a zipcmake -P: same files astools/fetch_miniz.sh.backups/, saves byte-identical to the Mac's, and the game's file select showed File 2 with the Autosave intact.test_save_flags,test_save_errors,test_save_romfs_fds) pass with the mount's new call.🤖 Generated with Claude Code