Move most helper logic from base HostInterface to FrontendCommon

This commit is contained in:
Connor McLaughlin
2020-06-09 02:05:55 +10:00
parent 444a09efd4
commit 075380f8e0
13 changed files with 1156 additions and 1086 deletions

View File

@ -1,6 +1,7 @@
#include "memory_card.h"
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/string_util.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "host_interface.h"
@ -254,7 +255,7 @@ std::unique_ptr<MemoryCard> MemoryCard::Open(System* system, std::string_view fi
message.AppendString(filename.data(), static_cast<u32>(filename.length()));
message.AppendString("' could not be read, formatting.");
Log_ErrorPrint(message);
system->GetHostInterface()->AddOSDMessage(message, 5.0f);
system->GetHostInterface()->AddOSDMessage(message.GetCharArray(), 5.0f);
mc->Format();
}
@ -385,7 +386,7 @@ bool MemoryCard::SaveIfChanged(bool display_osd_message)
if (display_osd_message)
{
m_system->GetHostInterface()->AddOSDMessage(
SmallString::FromFormat("Saved memory card to '%s'", m_filename.c_str()));
StringUtil::StdStringFromFormat("Saved memory card to '%s'", m_filename.c_str()));
}
return true;