Pad: Don't remove card when loading state without card in slot

... unless load-devices-from-state is enabled.
This commit is contained in:
Connor McLaughlin 2021-04-27 02:24:25 +10:00
parent e842abfa8a
commit b84827b315

View file

@ -199,6 +199,8 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i)
} }
if (!card_present_in_state && m_memory_cards[i]) if (!card_present_in_state && m_memory_cards[i])
{
if (g_settings.load_devices_from_save_states)
{ {
g_host_interface->AddFormattedOSDMessage( g_host_interface->AddFormattedOSDMessage(
20.0f, 20.0f,
@ -207,6 +209,16 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i)
i + 1u); i + 1u);
m_memory_cards[i].reset(); m_memory_cards[i].reset();
} }
else
{
g_host_interface->AddFormattedOSDMessage(
20.0f,
g_host_interface->TranslateString("OSDMessage",
"Memory card %u present in system but not in save state. Replugging card."),
i + 1u);
m_memory_cards[i]->Reset();
}
}
return true; return true;
} }