System: Confirm shutdown if memory card is being written

This commit is contained in:
Stenzek
2024-04-22 01:41:42 +10:00
parent a5613fc815
commit 3fa2bd1d3a
10 changed files with 171 additions and 50 deletions

View File

@ -3300,6 +3300,18 @@ bool System::HasMemoryCard(u32 slot)
return (Pad::GetMemoryCard(slot) != nullptr);
}
bool System::IsSavingMemoryCards()
{
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
{
MemoryCard* card = Pad::GetMemoryCard(i);
if (card && card->IsOrWasRecentlyWriting())
return true;
}
return false;
}
void System::SwapMemoryCards()
{
if (!IsValid())