small fix to writing memorycards, open as r+b so the file is not cleared when opening. should eliminate the 0byte memory card files reported http://forums.dolphin-emulator.com/showthread.php?tid=21964 http://forums.dolphin-emulator.com/showthread.php?tid=22631 http://forums.dolphin-emulator.com/showthread.php?tid=22098

This commit is contained in:
LPFaint99 2012-03-31 14:03:19 -07:00
parent 5c27e27a4a
commit 6bfb8c9597
1 changed files with 2 additions and 2 deletions

View File

@ -103,14 +103,14 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
void innerFlush(FlushData* data)
{
File::IOFile pFile(data->filename, "wb");
File::IOFile pFile(data->filename, "r+b");
if (!pFile)
{
std::string dir;
SplitPath(data->filename, &dir, 0, 0);
if (!File::IsDirectory(dir))
File::CreateFullPath(dir);
pFile.Open(data->filename, "wb");
pFile.Open(data->filename, "r+b");
}
if (!pFile) // Note - pFile changed inside above if