mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
fixes for backing up wii saves when playing a movie
This commit is contained in:
parent
8921fe0d09
commit
95d55ed1c7
@ -912,7 +912,7 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz)
|
||||
{
|
||||
if (File::Exists((savePath + "../backup/").c_str()))
|
||||
{
|
||||
// Dolphin must have crashed while playing back a movie previously, so we'll keep the backup, and just delete the current save
|
||||
// The last run of this game must have been to play back a movie, so their save is already backed up.
|
||||
File::DeleteDirRecursively(savePath.c_str());
|
||||
}
|
||||
else
|
||||
@ -928,7 +928,7 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz)
|
||||
}
|
||||
else if (File::Exists((savePath + "../backup/").c_str()))
|
||||
{
|
||||
// Dolphin must have crashed while playing back a movie previously. Since we're not playing a movie now, we'll delete the save, and use the backup
|
||||
// Delete the save made by a previous movie, and copy back the user's save.
|
||||
if (File::Exists((savePath + "banner.bin").c_str()))
|
||||
File::DeleteDirRecursively(savePath);
|
||||
#ifdef _WIN32
|
||||
|
@ -1022,17 +1022,6 @@ bool PlayWiimote(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures& rptf,
|
||||
|
||||
void EndPlayInput(bool cont)
|
||||
{
|
||||
if (IsPlayingInput() && IsConfigSaved() && IsStartingFromClearSave() && Core::g_CoreStartupParameter.bWii)
|
||||
{
|
||||
std::string savePath = Common::GetTitleDataPath(g_titleID);
|
||||
File::DeleteDirRecursively(savePath.c_str());
|
||||
#ifdef _WIN32
|
||||
MoveFile((savePath + "../backup/").c_str(), savePath.c_str());
|
||||
#else
|
||||
File::CopyDir((savePath + "../backup/").c_str(), savePath.c_str());
|
||||
File::DeleteDirRecursively((savePath + "../backup/").c_str());
|
||||
#endif
|
||||
}
|
||||
if (cont)
|
||||
{
|
||||
g_playMode = MODE_RECORDING;
|
||||
|
Loading…
x
Reference in New Issue
Block a user