diff --git a/Source/Core/DolphinWX/Src/MemcardManager.cpp b/Source/Core/DolphinWX/Src/MemcardManager.cpp index 74a699fac6..8cbc33dfe6 100644 --- a/Source/Core/DolphinWX/Src/MemcardManager.cpp +++ b/Source/Core/DolphinWX/Src/MemcardManager.cpp @@ -221,6 +221,8 @@ void CMemcardManager::ReloadMemcard(const char *fileName, int card) // TODO: add error checking and animate icons memoryCard[card] = new GCMemcard(fileName); + memoryCard[0]->Save(); // save the changes we made in TestChecksums + m_MemcardList[card]->Hide(); m_MemcardList[card]->ClearAll(); m_MemcardList[card]->InsertColumn(COLUMN_BANNER, _T("Banner")); diff --git a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp index 9bad19fa50..7d6c8eaffd 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp @@ -525,10 +525,26 @@ u32 GCMemcard::TestChecksums() if(BE16(dir.CheckSum1)!=csum1) results |= 2; if(BE16(dir.CheckSum2)!=csum2) results |= 2; + // ------------------------------------------------------------------------------------------ + // Save the checksums we just calculated + dir.CheckSum1[0]=u8(csum1>>8); + dir.CheckSum1[1]=u8(csum1); + dir.CheckSum2[0]=u8(csum2>>8); + dir.CheckSum2[1]=u8(csum2); + // ------------------------------------------------------------------------------------------ + calc_checksumsBE((u16*)&dir_backup,0xFFE,&csum1,&csum2); if(BE16(dir_backup.CheckSum1)!=csum1) results |= 4; if(BE16(dir_backup.CheckSum2)!=csum2) results |= 4; + // ------------------------------------------------------------------------------------------ + // Save the checksums we just calculated + dir_backup.CheckSum1[0]=u8(csum1>>8); + dir_backup.CheckSum1[1]=u8(csum1); + dir_backup.CheckSum2[0]=u8(csum2>>8); + dir_backup.CheckSum2[1]=u8(csum2); + // ------------------------------------------------------------------------------------------ + calc_checksumsBE((u16*)(((u8*)&bat)+4),0xFFE,&csum1,&csum2); if(BE16(bat.CheckSum1)!=csum1) results |= 8; if(BE16(bat.CheckSum2)!=csum2) results |= 8;