fix: handle unformatted memory cards on save restore#2384
Open
Moyasee wants to merge 7 commits into
Open
Conversation
Restoring a cloud save into an unformatted PS1/PS2 memory card failed with a generic "not a writable card" error. Detect the unformatted card before writing, block the restore with guidance to format it first, and log every restore failure path to error.txt.
Contributor
Disable the Restore button while card inspection is in flight, treat a rejected inspectMemcard promise as an unreadable card, and route the big-picture restore error toasts through i18n instead of hardcoded English strings.
Route the onRestoreSuccess toasts through cloud_restore_success so they match the now-translated error path and the renderer modal, instead of a hardcoded English string.
Contributor
Author
|
@greptile review again |
The earlier hint rule was inserted into the middle of a shared comma-separated selector group, which split it and applied the warning colour to .emulator-detail and .emulation-settings__scan-modal. Restore the original four-selector focus block and keep .emu-save-modal__hint as its own rule.
Contributor
Author
|
@greptile review |
PS2 cards now point users at PCSX2's auto-format-on-save behaviour instead of the generic memory card manager guidance, which does not apply to PCSX2. PS1 keeps the generic message via a separate key.
Add a cancelled flag to the getMemcardRestoreTargets effect in both restore modals so an in-flight fetch from a previous platform/save can't resolve late and overwrite the current targets and selection.
|
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.



When submitting this pull request, I confirm the following (please check the boxes):
Fill in the PR content:
Closes LBX-807.
Restoring a cloud save into an unformatted PS1/PS2 memory card used to fail with a confusing generic "not a writable card" error. This handles it gracefully.
What changed:
inspectPs1Card/inspectPs2Cardhelpers that classify a card file asformatted,unformatted, orunreadable(PS2 checks the superblock magic, PS1 checks the "MC" directory header).reasonthe UI can map to the message.error.txtwith context (platform, save id, card path, reason), not just thrown exceptions.New IPC
inspectMemcardexposes the card inspection to the renderer. New translation keycloud_restore_unformattedadded for en, pt-BR, ru, es.