-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix handling of Wii NAND's /tmp directory during savestate loads. #3798
Conversation
if (p.GetMode() == PointerWrap::MODE_READ) | ||
{ | ||
// We need to make sure all file handles are closed so WII_IPC_Devices_fs::DoState can successfully re-create /tmp | ||
for (u32 i = 0; i<IPC_MAX_FDS; i++) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Fixes Metroid prime crashing the second boot after loading a save state (issue 9496)
Because the file handles were open, the recursive delete was failing. The previous commit stopped the crash but this should make the restore actually happen has expected.
Reviewed 2 of 2 files at r2. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp, line 276 [r1] (raw file): Comments from Reviewable |
This PR added four extra DLLs to the Windows download that weren't there before. Was that intentional? |
This PR added no DLLs. That'd be correlation not causation for ya. |
I mean 4.0-9257 compared to 4.0-9254. |
Donkey Kong Country Returns is writing new data to some files in /tmp when loading each level. But the savestate code was opening the files a second time and reading some old and stale data out. As of dolphin-emu#3798, dolphin now correctly restores that stale data to /tmp, which broke DKCR (and probally countless other games). This PR closes all file handles before saving and loading savestates, which flushes the data out and pervents this issue. (old savestates are corrupted and will still cause crashes if loaded)
Donkey Kong Country Returns is writing new data to some files in /tmp when loading each level. But the savestate code was opening the files a second time and reading some old and stale data out. As of dolphin-emu#3798, dolphin now correctly restores that stale data to /tmp, which broke DKCR (and probally countless other games). This PR closes all file handles before saving and loading savestates, which flushes the data out and pervents this issue. (old savestates are corrupted and will still cause crashes if loaded)
Fixes issue 9496 and potentially other issues with savestates and wii games.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)