MemoryCard: Make formatting OSD message translatable

This commit is contained in:
Connor McLaughlin 2021-01-07 12:14:41 +10:00
parent d86fc03ecb
commit 24c373245e
1 changed files with 4 additions and 6 deletions

View File

@ -256,12 +256,10 @@ std::unique_ptr<MemoryCard> MemoryCard::Open(std::string_view filename)
mc->m_filename = filename; mc->m_filename = filename;
if (!mc->LoadFromFile()) if (!mc->LoadFromFile())
{ {
SmallString message; Log_InfoPrintf("Memory card at '%s' could not be read, formatting.", mc->m_filename.c_str());
message.AppendString("Memory card at '"); g_host_interface->AddFormattedOSDMessage(
message.AppendString(filename.data(), static_cast<u32>(filename.length())); 5.0f, g_host_interface->TranslateString("OSDMessage", "Memory card at '%s' could not be read, formatting."),
message.AppendString("' could not be read, formatting."); mc->m_filename.c_str());
Log_ErrorPrint(message);
g_host_interface->AddOSDMessage(message.GetCharArray(), 5.0f);
mc->Format(); mc->Format();
} }