diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2019-01-06 14:12:09 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2019-01-06 14:18:00 +0100 |
| commit | e6acbf7cbe71a013e4227405e36d9662bc44e452 (patch) | |
| tree | 1cb116f79917cd16fd75426139c526b2cf0b2233 /Source | |
| parent | 41767daabca1d8dc853eb66547a0b1c2d41b4627 (diff) | |
GCMemcard: 'Broken File000' commented out code can't work anymore, but leave a comment about it.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/GCMemcard/GCMemcard.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp index 8df7d5a662..cd723de7fb 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp @@ -759,27 +759,11 @@ u32 GCMemcard::RemoveFile(u8 index) // index in the directory array UpdateBat(UpdatedBat); Directory UpdatedDir = GetActiveDirectory(); - /* - // TODO: determine when this is used, even on the same memory card I have seen - // both update to broken file, and not updated - *(u32*)&UpdatedDir.m_dir_entries[index].m_gamecode = 0; - *(u16*)&UpdatedDir.m_dir_entries[index].m_makercode = 0; - memset(UpdatedDir.m_dir_entries[index].m_filename, 0, 0x20); - strcpy((char*)UpdatedDir.m_dir_entries[index].m_filename, "Broken File000"); - *(u16*)&UpdatedDir.m_update_counter = BE16(BE16(UpdatedDir.m_update_counter) + 1); - - *PreviousDir = UpdatedDir; - if (PreviousDir == &dir ) - { - CurrentDir = &dir; - PreviousDir = &dir_backup; - } - else - { - CurrentDir = &dir_backup; - PreviousDir = &dir; - } - */ + + // TODO: Deleting a file via the GC BIOS sometimes leaves behind an extra updated directory block + // here that has an empty file with the filename "Broken File000" where the actual deleted file + // was. Determine when exactly this happens and if this is neccessary for anything. + memset(&(UpdatedDir.m_dir_entries[index]), 0xFF, DENTRY_SIZE); UpdatedDir.m_update_counter = UpdatedDir.m_update_counter + 1; UpdateDirectory(UpdatedDir); |
