mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-09 21:51:39 +02:00
a46a8dd378
The current WiiSave code is extremely messy, as it exposes all kinds of implementation details in the header (including internal struct definitions and magic numbers that don't have to be). The read/write code is intermingled, so it's hard to tell which members are used, or when/where they are set at all. It also implicitly relies on some functions being called in a specific order since it doesn't seek manually every time, which makes the code even more fragile. The logic is also hardcoded to only support bin->nand or nand->bin, even though it would be useful to support nand->nand (for the Movie save copying code, for example). This commit attempts to solve these problems by getting rid of the WiiSave class: * Read/write code is moved to new Storage classes (NandStorage and DataBinStorage) with small, clear functions that do one and only one thing. * The import/export logic was refactored into a generic Copy function that takes two storages as parameters. * The existing import and export functions are now just small wrappers that call Copy with the appropriate storages. |
||
---|---|---|
.. | ||
Android | ||
Core | ||
DSPSpy | ||
DSPTool | ||
PCH | ||
UnitTests | ||
VSProps | ||
.clang-format | ||
CMakeLists.txt | ||
dolphin-emu.sln |