System: Don't insert blank memory card if path unspecified

This commit is contained in:
Connor McLaughlin 2020-03-30 00:14:15 +10:00
parent 3f042cd477
commit a9109c7552
1 changed files with 3 additions and 0 deletions

View File

@ -662,6 +662,9 @@ void System::UpdateMemoryCards()
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
{
m_pad->SetMemoryCard(i, nullptr);
if (settings.memory_card_paths[i].empty())
continue;
std::unique_ptr<MemoryCard> card = MemoryCard::Open(this, settings.memory_card_paths[i]);
if (card)
m_pad->SetMemoryCard(i, std::move(card));