Misc: Normalize code vs serial usage

This commit is contained in:
Connor McLaughlin
2022-10-05 18:29:08 +10:00
parent 4c3a5dd4d7
commit 10f98106dd
24 changed files with 165 additions and 162 deletions

View File

@ -536,7 +536,7 @@ void CommonHost::UpdateDiscordPresence(bool rich_presence_only)
if (!System::IsShutdown())
{
details_string.AppendFormattedString("%s (%s)", System::GetRunningTitle().c_str(),
System::GetRunningCode().c_str());
System::GetRunningSerial().c_str());
}
else
{
@ -600,7 +600,7 @@ static void HotkeyLoadStateSlot(bool global, s32 slot)
if (!System::IsValid())
return;
if (!global && System::GetRunningCode().empty())
if (!global && System::GetRunningSerial().empty())
{
Host::AddKeyedOSDMessage("LoadState", TRANSLATABLE("OSDMessage", "Cannot load state for game without serial."),
5.0f);
@ -608,7 +608,7 @@ static void HotkeyLoadStateSlot(bool global, s32 slot)
}
std::string path(global ? System::GetGlobalSaveStateFileName(slot) :
System::GetGameSaveStateFileName(System::GetRunningCode(), slot));
System::GetGameSaveStateFileName(System::GetRunningSerial(), slot));
if (!FileSystem::FileExists(path.c_str()))
{
Host::AddKeyedOSDMessage("LoadState",
@ -624,7 +624,7 @@ static void HotkeySaveStateSlot(bool global, s32 slot)
if (!System::IsValid())
return;
if (!global && System::GetRunningCode().empty())
if (!global && System::GetRunningSerial().empty())
{
Host::AddKeyedOSDMessage("LoadState", TRANSLATABLE("OSDMessage", "Cannot save state for game without serial."),
5.0f);
@ -632,7 +632,7 @@ static void HotkeySaveStateSlot(bool global, s32 slot)
}
std::string path(global ? System::GetGlobalSaveStateFileName(slot) :
System::GetGameSaveStateFileName(System::GetRunningCode(), slot));
System::GetGameSaveStateFileName(System::GetRunningSerial(), slot));
System::SaveState(path.c_str(), g_settings.create_save_state_backups);
}