System: Fix incorrect sanitization of memcard filenames

This commit is contained in:
Stenzek
2024-03-25 23:15:04 +10:00
parent 315524a89c
commit 7b8704aba1
4 changed files with 12 additions and 34 deletions

View File

@ -36,20 +36,6 @@ MemoryCard::~MemoryCard()
SaveIfChanged(false);
}
std::string MemoryCard::SanitizeGameTitleForFileName(const std::string_view& name)
{
std::string ret(name);
const u32 len = static_cast<u32>(ret.length());
for (u32 i = 0; i < len; i++)
{
if (ret[i] == '\\' || ret[i] == '/' || ret[i] == '?' || ret[i] == '*')
ret[i] = '_';
}
return ret;
}
TickCount MemoryCard::GetSaveDelayInTicks()
{
return System::GetTicksPerSecond() * SAVE_DELAY_IN_SECONDS;