mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
FileIO: update m_FileLength upon writes, so that MKWii doesn't end up seeking in rksys.dat at incredibly huge offsets.
MKWii still fails to create a new save file. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4704 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f255f08a99
commit
734daf362b
@ -208,6 +208,10 @@ bool CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
|
||||
size_t Result = fwrite(Memory::GetPointer(Address), Size, 1, m_pFileHandle);
|
||||
_dbg_assert_msg_(WII_IPC_FILEIO, Result == 1, "fwrite failed");
|
||||
ReturnValue = Size;
|
||||
|
||||
u32 NewPosition = (u32)ftell(m_pFileHandle);
|
||||
if (NewPosition > m_FileLength) // Oops, we made the file longer... let's update m_FileLength then
|
||||
m_FileLength = NewPosition;
|
||||
}
|
||||
|
||||
Memory::Write_U32(ReturnValue, _CommandAddress + 0x4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user