Skip to content

Commit

Permalink
[Core] Prevent SD data loss from silent resync failure
Browse files Browse the repository at this point in the history
  • Loading branch information
riidefi committed Jul 26, 2023
1 parent 44d2560 commit 75a7a4d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Core/Core/Core.cpp
Expand Up @@ -535,7 +535,15 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi

Common::ScopeGuard sd_folder_sync_guard{[sync_sd_folder] {
if (sync_sd_folder && Config::Get(Config::MAIN_ALLOW_SD_WRITES))
Common::SyncSDImageToSDFolder([]() { return false; });
{
bool sync_ok = Common::SyncSDImageToSDFolder([]() { return false; });
if (!sync_ok)
{
PanicAlertFmt("Failed to sync SD card with folder. All changes made this session will be "
"discarded on next boot if you do not manually re-issue a resync in Config > "
"Wii > SD Card Settings > Convert File to Folder Now!");
}
}
}};

// Load Wiimotes - only if we are booting in Wii mode
Expand Down

0 comments on commit 75a7a4d

Please sign in to comment.