GCMemcardDirectory: Use HasSameIdentity() in LoadGCI().

This is cheaper and more accurate than comparing default GCI filenames.
This commit is contained in:
Admiral H. Curtiss 2022-10-30 02:08:00 +02:00
parent b31b2db5fa
commit c517e92719
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB

View file

@ -44,7 +44,7 @@ bool GCMemcardDirectory::LoadGCI(Memcard::GCIFile gci)
// check if any already loaded file has the same internal name as the new file
for (const Memcard::GCIFile& already_loaded_gci : m_saves)
{
if (gci.m_gci_header.GCI_FileName() == already_loaded_gci.m_gci_header.GCI_FileName())
if (HasSameIdentity(gci.m_gci_header, already_loaded_gci.m_gci_header))
{
ERROR_LOG_FMT(EXPANSIONINTERFACE,
"{}\nwas not loaded because it has the same internal filename as previously "