mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-30 15:32:47 +00:00
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:
parent
5c27e27a4a
commit
6bfb8c9597
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user