System: Add option to use per-game memory cards with game title as filename

This commit is contained in:
Connor McLaughlin
2020-04-28 01:04:10 +10:00
parent d04b252962
commit e20fd61f0b
3 changed files with 22 additions and 3 deletions

View File

@ -823,6 +823,23 @@ void System::UpdateMemoryCards()
}
break;
case MemoryCardType::PerGameTitle:
{
if (m_running_game_title.empty())
{
m_host_interface->AddFormattedOSDMessage(5.0f,
"Per-game memory card cannot be used for slot %u as the running "
"game has no title. Using shared card instead.",
i + 1u);
card = MemoryCard::Open(this, m_host_interface->GetSharedMemoryCardPath(i));
}
else
{
card = MemoryCard::Open(this, m_host_interface->GetGameMemoryCardPath(m_running_game_title.c_str(), i));
}
}
break;
case MemoryCardType::Shared:
{
if (settings.memory_card_paths[i].empty())