Misc: Normalize OSD message keys
This commit is contained in:
parent
369599202c
commit
292c1e0f06
|
@ -306,7 +306,7 @@ void AnalogController::SetAnalogMode(bool enabled, bool show_message)
|
||||||
if (show_message)
|
if (show_message)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
fmt::format("analog_mode_toggle_{}", m_index), ICON_PF_GAMEPAD_ALT,
|
fmt::format("Controller{}AnalogMode", m_index), ICON_PF_GAMEPAD_ALT,
|
||||||
enabled ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
enabled ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
||||||
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,7 +244,7 @@ void NeGconRumble::SetAnalogMode(bool enabled, bool show_message)
|
||||||
if (show_message)
|
if (show_message)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
fmt::format("analog_mode_toggle_{}", m_index), ICON_FA_GAMEPAD,
|
fmt::format("Controller{}AnalogMode", m_index), ICON_FA_GAMEPAD,
|
||||||
enabled ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
enabled ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
||||||
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1495,7 +1495,7 @@ void System::ResetSystem()
|
||||||
|
|
||||||
ResetPerformanceCounters();
|
ResetPerformanceCounters();
|
||||||
ResetThrottler();
|
ResetThrottler();
|
||||||
Host::AddIconOSDMessage("system_reset", ICON_FA_POWER_OFF, TRANSLATE_STR("OSDMessage", "System reset."),
|
Host::AddIconOSDMessage("SystemReset", ICON_FA_POWER_OFF, TRANSLATE_STR("OSDMessage", "System reset."),
|
||||||
Host::OSD_QUICK_DURATION);
|
Host::OSD_QUICK_DURATION);
|
||||||
|
|
||||||
InterruptExecution();
|
InterruptExecution();
|
||||||
|
@ -2475,7 +2475,7 @@ bool System::DoState(StateWrapper& sw, GPUTexture** host_texture, bool update_di
|
||||||
g_settings.cpu_overclock_denominator != cpu_overclock_denominator))))
|
g_settings.cpu_overclock_denominator != cpu_overclock_denominator))))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
"state_overclock_difference", ICON_FA_EXCLAMATION_TRIANGLE,
|
"StateOverclockDifference", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "WARNING: CPU overclock ({}%) was different in save state ({}%)."),
|
fmt::format(TRANSLATE_FS("System", "WARNING: CPU overclock ({}%) was different in save state ({}%)."),
|
||||||
g_settings.cpu_overclock_enable ? g_settings.GetCPUOverclockPercent() : 100u,
|
g_settings.cpu_overclock_enable ? g_settings.GetCPUOverclockPercent() : 100u,
|
||||||
cpu_overclock_active ?
|
cpu_overclock_active ?
|
||||||
|
@ -2633,7 +2633,7 @@ bool System::LoadState(const char* path, Error* error, bool save_undo_state)
|
||||||
INFO_LOG("Loading state from '{}'...", path);
|
INFO_LOG("Loading state from '{}'...", path);
|
||||||
|
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
"load_state", ICON_EMOJI_OPEN_THE_FOLDER,
|
"LoadState", ICON_EMOJI_OPEN_THE_FOLDER,
|
||||||
fmt::format(TRANSLATE_FS("OSDMessage", "Loading state from '{}'..."), Path::GetFileName(path)),
|
fmt::format(TRANSLATE_FS("OSDMessage", "Loading state from '{}'..."), Path::GetFileName(path)),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
|
|
||||||
|
@ -4175,7 +4175,7 @@ bool System::SwitchMediaSubImage(u32 index)
|
||||||
Error error;
|
Error error;
|
||||||
if (!image->SwitchSubImage(index, &error))
|
if (!image->SwitchSubImage(index, &error))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("media_switch_subimage", ICON_FA_COMPACT_DISC,
|
Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
|
||||||
fmt::format(TRANSLATE_FS("System", "Failed to switch to subimage {} in '{}': {}."),
|
fmt::format(TRANSLATE_FS("System", "Failed to switch to subimage {} in '{}': {}."),
|
||||||
index + 1u, Path::GetFileName(image->GetFileName()), error.GetDescription()),
|
index + 1u, Path::GetFileName(image->GetFileName()), error.GetDescription()),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
|
@ -4185,7 +4185,7 @@ bool System::SwitchMediaSubImage(u32 index)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Host::AddIconOSDMessage("media_switch_subimage", ICON_FA_COMPACT_DISC,
|
Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
|
||||||
fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."),
|
fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."),
|
||||||
image->GetSubImageMetadata(index, "title"), index + 1u,
|
image->GetSubImageMetadata(index, "title"), index + 1u,
|
||||||
image->GetMetadata("title")),
|
image->GetMetadata("title")),
|
||||||
|
@ -5566,7 +5566,7 @@ bool System::SaveCheatList()
|
||||||
if (!System::GetCheatList()->SaveToPCSXRFile(filename.c_str()))
|
if (!System::GetCheatList()->SaveToPCSXRFile(filename.c_str()))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
"cheat_save_error", ICON_FA_EXCLAMATION_TRIANGLE,
|
"CheatSaveError", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Failed to save cheat list to '{}'."), Path::GetFileName(filename)),
|
fmt::format(TRANSLATE_FS("System", "Failed to save cheat list to '{}'."), Path::GetFileName(filename)),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
}
|
}
|
||||||
|
@ -5586,7 +5586,7 @@ bool System::DeleteCheatList()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
"cheat_delete", ICON_FA_EXCLAMATION_TRIANGLE,
|
"CheatDelete", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Deleted cheat list '{}'."), Path::GetFileName(filename)),
|
fmt::format(TRANSLATE_FS("System", "Deleted cheat list '{}'."), Path::GetFileName(filename)),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
@ -5630,13 +5630,13 @@ void System::SetCheatCodeState(u32 index, bool enabled)
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("cheat_{}_state", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(fmt::format("Cheat{}State", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Cheat '{}' enabled."), cc.description),
|
fmt::format(TRANSLATE_FS("System", "Cheat '{}' enabled."), cc.description),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("cheat_{}_state", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(fmt::format("Cheat{}State", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Cheat '{}' disabled."), cc.description),
|
fmt::format(TRANSLATE_FS("System", "Cheat '{}' disabled."), cc.description),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
@ -5653,13 +5653,13 @@ void System::ApplyCheatCode(u32 index)
|
||||||
if (!cc.enabled)
|
if (!cc.enabled)
|
||||||
{
|
{
|
||||||
cc.Apply();
|
cc.Apply();
|
||||||
Host::AddIconOSDMessage(fmt::format("cheat_{}_state", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(fmt::format("Cheat{}State", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Applied cheat '{}'."), cc.description),
|
fmt::format(TRANSLATE_FS("System", "Applied cheat '{}'."), cc.description),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("cheat_{}_state", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(fmt::format("Cheat{}State", index), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format(TRANSLATE_FS("System", "Cheat '{}' is already enabled."), cc.description),
|
fmt::format(TRANSLATE_FS("System", "Cheat '{}' is already enabled."), cc.description),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1903,7 +1903,7 @@ void Host::OnInputDeviceConnected(std::string_view identifier, std::string_view
|
||||||
|
|
||||||
if (System::IsValid() || g_emu_thread->isRunningFullscreenUI())
|
if (System::IsValid() || g_emu_thread->isRunningFullscreenUI())
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("controller_connected_{}", identifier), ICON_FA_GAMEPAD,
|
Host::AddIconOSDMessage(fmt::format("ControllerConnected{}", identifier), ICON_FA_GAMEPAD,
|
||||||
fmt::format(TRANSLATE_FS("QtHost", "Controller {} connected."), identifier),
|
fmt::format(TRANSLATE_FS("QtHost", "Controller {} connected."), identifier),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
@ -1924,12 +1924,12 @@ void Host::OnInputDeviceDisconnected(InputBindingKey key, std::string_view ident
|
||||||
// has to be done after pause, otherwise pause message takes precedence
|
// has to be done after pause, otherwise pause message takes precedence
|
||||||
emit g_emu_thread->statusMessage(message);
|
emit g_emu_thread->statusMessage(message);
|
||||||
});
|
});
|
||||||
Host::AddIconOSDMessage(fmt::format("controller_connected_{}", identifier), ICON_FA_GAMEPAD, std::move(message),
|
Host::AddIconOSDMessage(fmt::format("ControllerConnected{}", identifier), ICON_FA_GAMEPAD, std::move(message),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
else if (System::IsValid() || g_emu_thread->isRunningFullscreenUI())
|
else if (System::IsValid() || g_emu_thread->isRunningFullscreenUI())
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("controller_connected_{}", identifier), ICON_FA_GAMEPAD,
|
Host::AddIconOSDMessage(fmt::format("ControllerConnected{}", identifier), ICON_FA_GAMEPAD,
|
||||||
fmt::format(TRANSLATE_FS("QtHost", "Controller {} disconnected."), identifier),
|
fmt::format(TRANSLATE_FS("QtHost", "Controller {} disconnected."), identifier),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue