Card: cleanup interface. (PR #1059)

1) Remove Init()
2) Call Reset() via CardManager
3) Call Destroy() via CardManager (only used by Disks/Harddisk) on WM_DESTROY

The only "real" changes are in CSuperSerialCard: ensure destructor cleans up and remove Destroy().
This commit is contained in:
Andrea
2022-03-11 22:17:03 +00:00
committed by GitHub
parent bbe2a7f8ee
commit 12d1a0e1fe
20 changed files with 56 additions and 105 deletions
+22
View File
@@ -251,3 +251,25 @@ void CardManager::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
}
}
}
void CardManager::Reset(const bool powerCycle)
{
for (UINT i = SLOT0; i < NUM_SLOTS; ++i)
{
if (m_slot[i])
{
m_slot[i]->Reset(powerCycle);
}
}
}
void CardManager::Destroy()
{
for (UINT i = SLOT0; i < NUM_SLOTS; ++i)
{
if (m_slot[i])
{
m_slot[i]->Destroy();
}
}
}