Host: Split translation macros dependent on return type
This commit is contained in:
parent
39f64a03ee
commit
1ec6aee5bf
|
@ -828,49 +828,49 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
#undef BUTTON
|
||||
};
|
||||
|
||||
static const char* s_invert_settings[] = {TRANSLATABLE("AnalogController", "Not Inverted"),
|
||||
TRANSLATABLE("AnalogController", "Invert Left/Right"),
|
||||
TRANSLATABLE("AnalogController", "Invert Up/Down"),
|
||||
TRANSLATABLE("AnalogController", "Invert Left/Right + Up/Down"), nullptr};
|
||||
static const char* s_invert_settings[] = {TRANSLATE_NOOP("AnalogController", "Not Inverted"),
|
||||
TRANSLATE_NOOP("AnalogController", "Invert Left/Right"),
|
||||
TRANSLATE_NOOP("AnalogController", "Invert Up/Down"),
|
||||
TRANSLATE_NOOP("AnalogController", "Invert Left/Right + Up/Down"), nullptr};
|
||||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Boolean, "ForceAnalogOnReset", TRANSLATABLE("AnalogController", "Force Analog Mode on Reset"),
|
||||
TRANSLATABLE("AnalogController", "Forces the controller to analog mode when the console is reset/powered on."),
|
||||
{SettingInfo::Type::Boolean, "ForceAnalogOnReset", TRANSLATE_NOOP("AnalogController", "Force Analog Mode on Reset"),
|
||||
TRANSLATE_NOOP("AnalogController", "Forces the controller to analog mode when the console is reset/powered on."),
|
||||
"true"},
|
||||
{SettingInfo::Type::Boolean, "AnalogDPadInDigitalMode",
|
||||
TRANSLATABLE("AnalogController", "Use Analog Sticks for D-Pad in Digital Mode"),
|
||||
TRANSLATABLE("AnalogController",
|
||||
TRANSLATE_NOOP("AnalogController", "Use Analog Sticks for D-Pad in Digital Mode"),
|
||||
TRANSLATE_NOOP("AnalogController",
|
||||
"Allows you to use the analog sticks to control the d-pad in digital mode, as well as the buttons."),
|
||||
"true"},
|
||||
{SettingInfo::Type::Float, "AnalogDeadzone", TRANSLATABLE("AnalogController", "Analog Deadzone"),
|
||||
TRANSLATABLE("AnalogController",
|
||||
{SettingInfo::Type::Float, "AnalogDeadzone", TRANSLATE_NOOP("AnalogController", "Analog Deadzone"),
|
||||
TRANSLATE_NOOP("AnalogController",
|
||||
"Sets the analog stick deadzone, i.e. the fraction of the stick movement which will be ignored."),
|
||||
"0.00f", "0.00f", "1.00f", "0.01f", "%.0f%%", nullptr, 100.0f},
|
||||
{SettingInfo::Type::Float, "AnalogSensitivity", TRANSLATABLE("AnalogController", "Analog Sensitivity"),
|
||||
TRANSLATABLE(
|
||||
{SettingInfo::Type::Float, "AnalogSensitivity", TRANSLATE_NOOP("AnalogController", "Analog Sensitivity"),
|
||||
TRANSLATE_NOOP(
|
||||
"AnalogController",
|
||||
"Sets the analog stick axis scaling factor. A value between 130% and 140% is recommended when using recent "
|
||||
"controllers, e.g. DualShock 4, Xbox One Controller."),
|
||||
"1.33f", "0.01f", "2.00f", "0.01f", "%.0f%%", nullptr, 100.0f},
|
||||
{SettingInfo::Type::Float, "ButtonDeadzone", TRANSLATABLE("AnalogController", "Button/Trigger Deadzone"),
|
||||
TRANSLATABLE("AnalogController", "Sets the deadzone for activating buttons/triggers, "
|
||||
{SettingInfo::Type::Float, "ButtonDeadzone", TRANSLATE_NOOP("AnalogController", "Button/Trigger Deadzone"),
|
||||
TRANSLATE_NOOP("AnalogController", "Sets the deadzone for activating buttons/triggers, "
|
||||
"i.e. the fraction of the trigger which will be ignored."),
|
||||
"0.25", "0.00", "1.00", "0.01", "%.0f%%", nullptr, 100.0f},
|
||||
{SettingInfo::Type::Integer, "VibrationBias", TRANSLATABLE("AnalogController", "Vibration Bias"),
|
||||
TRANSLATABLE("AnalogController", "Sets the rumble bias value. If rumble in some games is too weak or not "
|
||||
{SettingInfo::Type::Integer, "VibrationBias", TRANSLATE_NOOP("AnalogController", "Vibration Bias"),
|
||||
TRANSLATE_NOOP("AnalogController", "Sets the rumble bias value. If rumble in some games is too weak or not "
|
||||
"functioning, try increasing this value."),
|
||||
"8", "0", "255", "1", "%d", nullptr, 1.0f},
|
||||
{SettingInfo::Type::IntegerList, "InvertLeftStick", TRANSLATABLE("AnalogController", "Invert Left Stick"),
|
||||
TRANSLATABLE("AnalogController", "Inverts the direction of the left analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
{SettingInfo::Type::IntegerList, "InvertLeftStick", TRANSLATE_NOOP("AnalogController", "Invert Left Stick"),
|
||||
TRANSLATE_NOOP("AnalogController", "Inverts the direction of the left analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
s_invert_settings, 0.0f},
|
||||
{SettingInfo::Type::IntegerList, "InvertRightStick", TRANSLATABLE("AnalogController", "Invert Right Stick"),
|
||||
TRANSLATABLE("AnalogController", "Inverts the direction of the right analog stick."), "0", "0", "3", nullptr,
|
||||
{SettingInfo::Type::IntegerList, "InvertRightStick", TRANSLATE_NOOP("AnalogController", "Invert Right Stick"),
|
||||
TRANSLATE_NOOP("AnalogController", "Inverts the direction of the right analog stick."), "0", "0", "3", nullptr,
|
||||
nullptr, s_invert_settings, 0.0f},
|
||||
};
|
||||
|
||||
const Controller::ControllerInfo AnalogController::INFO = {ControllerType::AnalogController,
|
||||
"AnalogController",
|
||||
TRANSLATABLE("ControllerType", "Analog Controller"),
|
||||
TRANSLATE_NOOP("ControllerType", "Analog Controller"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -374,33 +374,33 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
#undef BUTTON
|
||||
};
|
||||
|
||||
static const char* s_invert_settings[] = {TRANSLATABLE("AnalogJoystick", "Not Inverted"),
|
||||
TRANSLATABLE("AnalogJoystick", "Invert Left/Right"),
|
||||
TRANSLATABLE("AnalogJoystick", "Invert Up/Down"),
|
||||
TRANSLATABLE("AnalogJoystick", "Invert Left/Right + Up/Down"), nullptr};
|
||||
static const char* s_invert_settings[] = {TRANSLATE_NOOP("AnalogJoystick", "Not Inverted"),
|
||||
TRANSLATE_NOOP("AnalogJoystick", "Invert Left/Right"),
|
||||
TRANSLATE_NOOP("AnalogJoystick", "Invert Up/Down"),
|
||||
TRANSLATE_NOOP("AnalogJoystick", "Invert Left/Right + Up/Down"), nullptr};
|
||||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Float, "AnalogDeadzone", TRANSLATABLE("AnalogJoystick", "Analog Deadzone"),
|
||||
TRANSLATABLE("AnalogJoystick",
|
||||
{SettingInfo::Type::Float, "AnalogDeadzone", TRANSLATE_NOOP("AnalogJoystick", "Analog Deadzone"),
|
||||
TRANSLATE_NOOP("AnalogJoystick",
|
||||
"Sets the analog stick deadzone, i.e. the fraction of the stick movement which will be ignored."),
|
||||
"1.00f", "0.00f", "1.00f", "0.01f", "%.0f%%", nullptr, 100.0f},
|
||||
{SettingInfo::Type::Float, "AnalogSensitivity", TRANSLATABLE("AnalogJoystick", "Analog Sensitivity"),
|
||||
TRANSLATABLE(
|
||||
{SettingInfo::Type::Float, "AnalogSensitivity", TRANSLATE_NOOP("AnalogJoystick", "Analog Sensitivity"),
|
||||
TRANSLATE_NOOP(
|
||||
"AnalogJoystick",
|
||||
"Sets the analog stick axis scaling factor. A value between 130% and 140% is recommended when using recent "
|
||||
"controllers, e.g. DualShock 4, Xbox One Controller."),
|
||||
"1.33f", "0.01f", "2.00f", "0.01f", "%.0f%%", nullptr, 100.0f},
|
||||
{SettingInfo::Type::IntegerList, "InvertLeftStick", TRANSLATABLE("AnalogJoystick", "Invert Left Stick"),
|
||||
TRANSLATABLE("AnalogJoystick", "Inverts the direction of the left analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
{SettingInfo::Type::IntegerList, "InvertLeftStick", TRANSLATE_NOOP("AnalogJoystick", "Invert Left Stick"),
|
||||
TRANSLATE_NOOP("AnalogJoystick", "Inverts the direction of the left analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
s_invert_settings, 0.0f},
|
||||
{SettingInfo::Type::IntegerList, "InvertRightStick", TRANSLATABLE("AnalogJoystick", "Invert Right Stick"),
|
||||
TRANSLATABLE("AnalogJoystick", "Inverts the direction of the right analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
{SettingInfo::Type::IntegerList, "InvertRightStick", TRANSLATE_NOOP("AnalogJoystick", "Invert Right Stick"),
|
||||
TRANSLATE_NOOP("AnalogJoystick", "Inverts the direction of the right analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||
s_invert_settings, 0.0f},
|
||||
};
|
||||
|
||||
const Controller::ControllerInfo AnalogJoystick::INFO = {ControllerType::AnalogJoystick,
|
||||
"AnalogJoystick",
|
||||
TRANSLATABLE("ControllerType", "Analog Joystick"),
|
||||
TRANSLATE_NOOP("ControllerType", "Analog Joystick"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -2767,7 +2767,7 @@ void CheatCode::ApplyOnDisable() const
|
|||
}
|
||||
|
||||
static std::array<const char*, 1> s_cheat_code_type_names = {{"Gameshark"}};
|
||||
static std::array<const char*, 1> s_cheat_code_type_display_names{{TRANSLATABLE("Cheats", "Gameshark")}};
|
||||
static std::array<const char*, 1> s_cheat_code_type_display_names{{TRANSLATE_NOOP("Cheats", "Gameshark")}};
|
||||
|
||||
const char* CheatCode::GetTypeName(Type type)
|
||||
{
|
||||
|
@ -2792,7 +2792,7 @@ std::optional<CheatCode::Type> CheatCode::ParseTypeName(const char* str)
|
|||
|
||||
static std::array<const char*, 2> s_cheat_code_activation_names = {{"Manual", "EndFrame"}};
|
||||
static std::array<const char*, 2> s_cheat_code_activation_display_names{
|
||||
{TRANSLATABLE("Cheats", "Manual"), TRANSLATABLE("Cheats", "Automatic (Frame End)")}};
|
||||
{TRANSLATE_NOOP("Cheats", "Manual"), TRANSLATE_NOOP("Cheats", "Automatic (Frame End)")}};
|
||||
|
||||
const char* CheatCode::GetActivationName(Activation activation)
|
||||
{
|
||||
|
|
|
@ -642,7 +642,7 @@ static void HotkeyLoadStateSlot(bool global, s32 slot)
|
|||
|
||||
if (!global && System::GetGameSerial().empty())
|
||||
{
|
||||
Host::AddKeyedOSDMessage("LoadState", TRANSLATABLE("OSDMessage", "Cannot load state for game without serial."),
|
||||
Host::AddKeyedOSDMessage("LoadState", TRANSLATE_NOOP("OSDMessage", "Cannot load state for game without serial."),
|
||||
5.0f);
|
||||
return;
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ static void HotkeyLoadStateSlot(bool global, s32 slot)
|
|||
if (!FileSystem::FileExists(path.c_str()))
|
||||
{
|
||||
Host::AddKeyedOSDMessage("LoadState",
|
||||
fmt::format(TRANSLATABLE("OSDMessage", "No save state found in slot {}."), slot), 5.0f);
|
||||
fmt::format(TRANSLATE_NOOP("OSDMessage", "No save state found in slot {}."), slot), 5.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ static void HotkeySaveStateSlot(bool global, s32 slot)
|
|||
|
||||
if (!global && System::GetGameSerial().empty())
|
||||
{
|
||||
Host::AddKeyedOSDMessage("LoadState", TRANSLATABLE("OSDMessage", "Cannot save state for game without serial."),
|
||||
Host::AddKeyedOSDMessage("LoadState", TRANSLATE_NOOP("OSDMessage", "Cannot save state for game without serial."),
|
||||
5.0f);
|
||||
return;
|
||||
}
|
||||
|
@ -678,66 +678,66 @@ static void HotkeySaveStateSlot(bool global, s32 slot)
|
|||
|
||||
BEGIN_HOTKEY_LIST(g_common_hotkeys)
|
||||
#ifndef __ANDROID__
|
||||
DEFINE_HOTKEY("OpenPauseMenu", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Open Pause Menu"),
|
||||
DEFINE_HOTKEY("OpenPauseMenu", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Open Pause Menu"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
FullscreenUI::OpenPauseMenu();
|
||||
})
|
||||
#endif
|
||||
|
||||
DEFINE_HOTKEY("FastForward", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Fast Forward"),
|
||||
DEFINE_HOTKEY("FastForward", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Fast Forward"),
|
||||
[](s32 pressed) {
|
||||
if (pressed < 0)
|
||||
return;
|
||||
System::SetFastForwardEnabled(pressed > 0);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ToggleFastForward", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Toggle Fast Forward"),
|
||||
DEFINE_HOTKEY("ToggleFastForward", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Toggle Fast Forward"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::SetFastForwardEnabled(!System::IsFastForwardEnabled());
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("Turbo", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Turbo"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("Turbo", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Turbo"), [](s32 pressed) {
|
||||
if (pressed < 0)
|
||||
return;
|
||||
System::SetTurboEnabled(pressed > 0);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ToggleTurbo", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Toggle Turbo"),
|
||||
DEFINE_HOTKEY("ToggleTurbo", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Toggle Turbo"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::SetTurboEnabled(!System::IsTurboEnabled());
|
||||
})
|
||||
|
||||
#ifndef __ANDROID__
|
||||
DEFINE_HOTKEY("ToggleFullscreen", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Toggle Fullscreen"),
|
||||
DEFINE_HOTKEY("ToggleFullscreen", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Toggle Fullscreen"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::SetFullscreen(!Host::IsFullscreen());
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("TogglePause", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Toggle Pause"),
|
||||
DEFINE_HOTKEY("TogglePause", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Toggle Pause"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::PauseSystem(!System::IsPaused());
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("PowerOff", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Power Off System"),
|
||||
DEFINE_HOTKEY("PowerOff", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Power Off System"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RequestSystemShutdown(true, g_settings.save_state_on_exit);
|
||||
})
|
||||
#endif
|
||||
|
||||
DEFINE_HOTKEY("Screenshot", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Save Screenshot"),
|
||||
DEFINE_HOTKEY("Screenshot", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Save Screenshot"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::SaveScreenshot();
|
||||
})
|
||||
|
||||
#if !defined(__ANDROID__) && defined(WITH_CHEEVOS)
|
||||
DEFINE_HOTKEY("OpenAchievements", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Open Achievement List"),
|
||||
DEFINE_HOTKEY("OpenAchievements", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Open Achievement List"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
{
|
||||
|
@ -750,7 +750,7 @@ DEFINE_HOTKEY("OpenAchievements", TRANSLATABLE("Hotkeys", "General"), TRANSLATAB
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("OpenLeaderboards", TRANSLATABLE("Hotkeys", "General"), TRANSLATABLE("Hotkeys", "Open Leaderboard List"),
|
||||
DEFINE_HOTKEY("OpenLeaderboards", TRANSLATE_NOOP("Hotkeys", "General"), TRANSLATE_NOOP("Hotkeys", "Open Leaderboard List"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
{
|
||||
|
@ -764,12 +764,12 @@ DEFINE_HOTKEY("OpenLeaderboards", TRANSLATABLE("Hotkeys", "General"), TRANSLATAB
|
|||
})
|
||||
#endif // !defined(__ANDROID__) && defined(WITH_CHEEVOS)
|
||||
|
||||
DEFINE_HOTKEY("Reset", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Reset System"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("Reset", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Reset System"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(System::ResetSystem);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ChangeDisc", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Change Disc"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ChangeDisc", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Change Disc"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid() && System::HasMediaSubImages())
|
||||
{
|
||||
const u32 current = System::GetMediaSubImageIndex();
|
||||
|
@ -779,41 +779,41 @@ DEFINE_HOTKEY("ChangeDisc", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hot
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("SwapMemoryCards", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Swap Memory Card Slots"),
|
||||
DEFINE_HOTKEY("SwapMemoryCards", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Swap Memory Card Slots"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::SwapMemoryCards();
|
||||
})
|
||||
|
||||
#ifndef __ANDROID__
|
||||
DEFINE_HOTKEY("FrameStep", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Frame Step"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("FrameStep", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Frame Step"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::DoFrameStep();
|
||||
})
|
||||
#endif
|
||||
|
||||
DEFINE_HOTKEY("Rewind", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Rewind"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("Rewind", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Rewind"), [](s32 pressed) {
|
||||
if (pressed < 0)
|
||||
return;
|
||||
System::SetRewindState(pressed > 0);
|
||||
})
|
||||
|
||||
#ifndef __ANDROID__
|
||||
DEFINE_HOTKEY("ToggleCheats", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Toggle Cheats"),
|
||||
DEFINE_HOTKEY("ToggleCheats", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Cheats"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::DoToggleCheats();
|
||||
})
|
||||
#else
|
||||
DEFINE_HOTKEY("TogglePatchCodes", TRANSLATABLE("Hotkeys", "System"), TRANSLATABLE("Hotkeys", "Toggle Patch Codes"),
|
||||
DEFINE_HOTKEY("TogglePatchCodes", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Patch Codes"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::DoToggleCheats();
|
||||
})
|
||||
#endif
|
||||
|
||||
DEFINE_HOTKEY("ToggleOverclocking", TRANSLATABLE("Hotkeys", "System"),
|
||||
TRANSLATABLE("Hotkeys", "Toggle Clock Speed Control (Overclocking)"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ToggleOverclocking", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Toggle Clock Speed Control (Overclocking)"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.cpu_overclock_enable = !g_settings.cpu_overclock_enable;
|
||||
|
@ -840,8 +840,8 @@ DEFINE_HOTKEY("ToggleOverclocking", TRANSLATABLE("Hotkeys", "System"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("IncreaseEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
||||
TRANSLATABLE("Hotkeys", "Increase Emulation Speed"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("IncreaseEmulationSpeed", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Increase Emulation Speed"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.emulation_speed += 0.1f;
|
||||
|
@ -852,8 +852,8 @@ DEFINE_HOTKEY("IncreaseEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("DecreaseEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
||||
TRANSLATABLE("Hotkeys", "Decrease Emulation Speed"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("DecreaseEmulationSpeed", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Decrease Emulation Speed"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.emulation_speed = std::max(g_settings.emulation_speed - 0.1f, 0.1f);
|
||||
|
@ -864,8 +864,8 @@ DEFINE_HOTKEY("DecreaseEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ResetEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
||||
TRANSLATABLE("Hotkeys", "Reset Emulation Speed"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ResetEmulationSpeed", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Reset Emulation Speed"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.emulation_speed = Host::GetFloatSettingValue("Main", "EmulationSpeed", 1.0f);
|
||||
|
@ -876,13 +876,13 @@ DEFINE_HOTKEY("ResetEmulationSpeed", TRANSLATABLE("Hotkeys", "System"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ToggleSoftwareRendering", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Toggle Software Rendering"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ToggleSoftwareRendering", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Toggle Software Rendering"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
System::ToggleSoftwareRendering();
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("TogglePGXP", TRANSLATABLE("Hotkeys", "Graphics"), TRANSLATABLE("Hotkeys", "Toggle PGXP"),
|
||||
DEFINE_HOTKEY("TogglePGXP", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle PGXP"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
|
@ -908,32 +908,32 @@ DEFINE_HOTKEY("TogglePGXP", TRANSLATABLE("Hotkeys", "Graphics"), TRANSLATABLE("H
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("IncreaseResolutionScale", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Increase Resolution Scale"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("IncreaseResolutionScale", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Increase Resolution Scale"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
HotkeyModifyResolutionScale(1);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("DecreaseResolutionScale", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Decrease Resolution Scale"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("DecreaseResolutionScale", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Decrease Resolution Scale"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
HotkeyModifyResolutionScale(-1);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("TogglePostProcessing", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Toggle Post-Processing"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("TogglePostProcessing", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Toggle Post-Processing"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
System::TogglePostProcessing();
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ReloadPostProcessingShaders", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Reload Post Processing Shaders"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ReloadPostProcessingShaders", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Reload Post Processing Shaders"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
System::ReloadPostProcessingShaders();
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ReloadTextureReplacements", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Reload Texture Replacements"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("ReloadTextureReplacements", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Reload Texture Replacements"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
Host::AddKeyedOSDMessage("ReloadTextureReplacements",
|
||||
|
@ -943,14 +943,14 @@ DEFINE_HOTKEY("ReloadTextureReplacements", TRANSLATABLE("Hotkeys", "Graphics"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("ToggleWidescreen", TRANSLATABLE("Hotkeys", "Graphics"), TRANSLATABLE("Hotkeys", "Toggle Widescreen"),
|
||||
DEFINE_HOTKEY("ToggleWidescreen", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle Widescreen"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
System::ToggleWidescreen();
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("TogglePGXPDepth", TRANSLATABLE("Hotkeys", "Graphics"),
|
||||
TRANSLATABLE("Hotkeys", "Toggle PGXP Depth Buffer"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("TogglePGXPDepth", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Toggle PGXP Depth Buffer"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.gpu_pgxp_depth_buffer = !g_settings.gpu_pgxp_depth_buffer;
|
||||
|
@ -970,7 +970,7 @@ DEFINE_HOTKEY("TogglePGXPDepth", TRANSLATABLE("Hotkeys", "Graphics"),
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("TogglePGXPCPU", TRANSLATABLE("Hotkeys", "Graphics"), TRANSLATABLE("Hotkeys", "Toggle PGXP CPU Mode"),
|
||||
DEFINE_HOTKEY("TogglePGXPCPU", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle PGXP CPU Mode"),
|
||||
[](s32 pressed) {
|
||||
if (pressed && System::IsValid())
|
||||
{
|
||||
|
@ -997,7 +997,7 @@ DEFINE_HOTKEY("TogglePGXPCPU", TRANSLATABLE("Hotkeys", "Graphics"), TRANSLATABLE
|
|||
}
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("AudioMute", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("Hotkeys", "Toggle Mute"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("AudioMute", TRANSLATE_NOOP("Hotkeys", "Audio"), TRANSLATE_NOOP("Hotkeys", "Toggle Mute"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.audio_output_muted = !g_settings.audio_output_muted;
|
||||
|
@ -1016,7 +1016,7 @@ DEFINE_HOTKEY("AudioMute", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("Hotke
|
|||
}
|
||||
}
|
||||
})
|
||||
DEFINE_HOTKEY("AudioCDAudioMute", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("Hotkeys", "Toggle CD Audio Mute"),
|
||||
DEFINE_HOTKEY("AudioCDAudioMute", TRANSLATE_NOOP("Hotkeys", "Audio"), TRANSLATE_NOOP("Hotkeys", "Toggle CD Audio Mute"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
|
@ -1028,7 +1028,7 @@ DEFINE_HOTKEY("AudioCDAudioMute", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE
|
|||
2.0f);
|
||||
}
|
||||
})
|
||||
DEFINE_HOTKEY("AudioVolumeUp", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("Hotkeys", "Volume Up"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("AudioVolumeUp", TRANSLATE_NOOP("Hotkeys", "Audio"), TRANSLATE_NOOP("Hotkeys", "Volume Up"), [](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
g_settings.audio_output_muted = false;
|
||||
|
@ -1042,7 +1042,7 @@ DEFINE_HOTKEY("AudioVolumeUp", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("H
|
|||
5.0f);
|
||||
}
|
||||
})
|
||||
DEFINE_HOTKEY("AudioVolumeDown", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE("Hotkeys", "Volume Down"),
|
||||
DEFINE_HOTKEY("AudioVolumeDown", TRANSLATE_NOOP("Hotkeys", "Audio"), TRANSLATE_NOOP("Hotkeys", "Volume Down"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed && System::IsValid())
|
||||
{
|
||||
|
@ -1059,28 +1059,28 @@ DEFINE_HOTKEY("AudioVolumeDown", TRANSLATABLE("Hotkeys", "Audio"), TRANSLATABLE(
|
|||
})
|
||||
|
||||
// NOTE: All save/load state hotkeys are deferred, because it can trigger setting reapply, which reloads bindings.
|
||||
DEFINE_HOTKEY("LoadSelectedSaveState", TRANSLATABLE("Hotkeys", "Save States"),
|
||||
TRANSLATABLE("Hotkeys", "Load From Selected Slot"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("LoadSelectedSaveState", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Load From Selected Slot"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(SaveStateSelectorUI::LoadCurrentSlot);
|
||||
})
|
||||
DEFINE_HOTKEY("SaveSelectedSaveState", TRANSLATABLE("Hotkeys", "Save States"),
|
||||
TRANSLATABLE("Hotkeys", "Save To Selected Slot"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("SaveSelectedSaveState", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Save To Selected Slot"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(SaveStateSelectorUI::SaveCurrentSlot);
|
||||
})
|
||||
DEFINE_HOTKEY("SelectPreviousSaveStateSlot", TRANSLATABLE("Hotkeys", "Save States"),
|
||||
TRANSLATABLE("Hotkeys", "Select Previous Save Slot"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("SelectPreviousSaveStateSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Select Previous Save Slot"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(SaveStateSelectorUI::SelectPreviousSlot);
|
||||
})
|
||||
DEFINE_HOTKEY("SelectNextSaveStateSlot", TRANSLATABLE("Hotkeys", "Save States"),
|
||||
TRANSLATABLE("Hotkeys", "Select Next Save Slot"), [](s32 pressed) {
|
||||
DEFINE_HOTKEY("SelectNextSaveStateSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||
TRANSLATE_NOOP("Hotkeys", "Select Next Save Slot"), [](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(SaveStateSelectorUI::SelectNextSlot);
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("UndoLoadState", TRANSLATABLE("Hotkeys", "Save States"), TRANSLATABLE("Hotkeys", "Undo Load State"),
|
||||
DEFINE_HOTKEY("UndoLoadState", TRANSLATE_NOOP("Hotkeys", "Save States"), TRANSLATE_NOOP("Hotkeys", "Undo Load State"),
|
||||
[](s32 pressed) {
|
||||
if (!pressed)
|
||||
Host::RunOnCPUThread(System::UndoLoadState);
|
||||
|
@ -1099,47 +1099,47 @@ DEFINE_HOTKEY("UndoLoadState", TRANSLATABLE("Hotkeys", "Save States"), TRANSLATA
|
|||
Host::RunOnCPUThread([]() { HotkeySaveStateSlot(global, slot); }); \
|
||||
})
|
||||
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 1, TRANSLATABLE("Hotkeys", "Load Game State 1"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 1, TRANSLATABLE("Hotkeys", "Save Game State 1"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 2, TRANSLATABLE("Hotkeys", "Load Game State 2"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 2, TRANSLATABLE("Hotkeys", "Save Game State 2"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 3, TRANSLATABLE("Hotkeys", "Load Game State 3"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 3, TRANSLATABLE("Hotkeys", "Save Game State 3"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 4, TRANSLATABLE("Hotkeys", "Load Game State 4"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 4, TRANSLATABLE("Hotkeys", "Save Game State 4"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 5, TRANSLATABLE("Hotkeys", "Load Game State 5"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 5, TRANSLATABLE("Hotkeys", "Save Game State 5"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 6, TRANSLATABLE("Hotkeys", "Load Game State 6"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 6, TRANSLATABLE("Hotkeys", "Save Game State 6"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 7, TRANSLATABLE("Hotkeys", "Load Game State 7"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 7, TRANSLATABLE("Hotkeys", "Save Game State 7"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 8, TRANSLATABLE("Hotkeys", "Load Game State 8"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 8, TRANSLATABLE("Hotkeys", "Save Game State 8"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 9, TRANSLATABLE("Hotkeys", "Load Game State 9"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 9, TRANSLATABLE("Hotkeys", "Save Game State 9"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 10, TRANSLATABLE("Hotkeys", "Load Game State 10"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 10, TRANSLATABLE("Hotkeys", "Save Game State 10"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 1, TRANSLATE_NOOP("Hotkeys", "Load Game State 1"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 1, TRANSLATE_NOOP("Hotkeys", "Save Game State 1"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 2, TRANSLATE_NOOP("Hotkeys", "Load Game State 2"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 2, TRANSLATE_NOOP("Hotkeys", "Save Game State 2"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 3, TRANSLATE_NOOP("Hotkeys", "Load Game State 3"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 3, TRANSLATE_NOOP("Hotkeys", "Save Game State 3"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 4, TRANSLATE_NOOP("Hotkeys", "Load Game State 4"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 4, TRANSLATE_NOOP("Hotkeys", "Save Game State 4"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 5, TRANSLATE_NOOP("Hotkeys", "Load Game State 5"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 5, TRANSLATE_NOOP("Hotkeys", "Save Game State 5"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 6, TRANSLATE_NOOP("Hotkeys", "Load Game State 6"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 6, TRANSLATE_NOOP("Hotkeys", "Save Game State 6"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 7, TRANSLATE_NOOP("Hotkeys", "Load Game State 7"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 7, TRANSLATE_NOOP("Hotkeys", "Save Game State 7"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 8, TRANSLATE_NOOP("Hotkeys", "Load Game State 8"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 8, TRANSLATE_NOOP("Hotkeys", "Save Game State 8"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 9, TRANSLATE_NOOP("Hotkeys", "Load Game State 9"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 9, TRANSLATE_NOOP("Hotkeys", "Save Game State 9"))
|
||||
MAKE_LOAD_STATE_HOTKEY(false, 10, TRANSLATE_NOOP("Hotkeys", "Load Game State 10"))
|
||||
MAKE_SAVE_STATE_HOTKEY(false, 10, TRANSLATE_NOOP("Hotkeys", "Save Game State 10"))
|
||||
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 1, TRANSLATABLE("Hotkeys", "Load Global State 1"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 1, TRANSLATABLE("Hotkeys", "Save Global State 1"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 2, TRANSLATABLE("Hotkeys", "Load Global State 2"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 2, TRANSLATABLE("Hotkeys", "Save Global State 2"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 3, TRANSLATABLE("Hotkeys", "Load Global State 3"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 3, TRANSLATABLE("Hotkeys", "Save Global State 3"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 4, TRANSLATABLE("Hotkeys", "Load Global State 4"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 4, TRANSLATABLE("Hotkeys", "Save Global State 4"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 5, TRANSLATABLE("Hotkeys", "Load Global State 5"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 5, TRANSLATABLE("Hotkeys", "Save Global State 5"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 6, TRANSLATABLE("Hotkeys", "Load Global State 6"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 6, TRANSLATABLE("Hotkeys", "Save Global State 6"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 7, TRANSLATABLE("Hotkeys", "Load Global State 7"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 7, TRANSLATABLE("Hotkeys", "Save Global State 7"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 8, TRANSLATABLE("Hotkeys", "Load Global State 8"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 8, TRANSLATABLE("Hotkeys", "Save Global State 8"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 9, TRANSLATABLE("Hotkeys", "Load Global State 9"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 9, TRANSLATABLE("Hotkeys", "Save Global State 9"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 10, TRANSLATABLE("Hotkeys", "Load Global State 10"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 10, TRANSLATABLE("Hotkeys", "Save Global State 10"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 1, TRANSLATE_NOOP("Hotkeys", "Load Global State 1"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 1, TRANSLATE_NOOP("Hotkeys", "Save Global State 1"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 2, TRANSLATE_NOOP("Hotkeys", "Load Global State 2"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 2, TRANSLATE_NOOP("Hotkeys", "Save Global State 2"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 3, TRANSLATE_NOOP("Hotkeys", "Load Global State 3"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 3, TRANSLATE_NOOP("Hotkeys", "Save Global State 3"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 4, TRANSLATE_NOOP("Hotkeys", "Load Global State 4"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 4, TRANSLATE_NOOP("Hotkeys", "Save Global State 4"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 5, TRANSLATE_NOOP("Hotkeys", "Load Global State 5"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 5, TRANSLATE_NOOP("Hotkeys", "Save Global State 5"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 6, TRANSLATE_NOOP("Hotkeys", "Load Global State 6"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 6, TRANSLATE_NOOP("Hotkeys", "Save Global State 6"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 7, TRANSLATE_NOOP("Hotkeys", "Load Global State 7"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 7, TRANSLATE_NOOP("Hotkeys", "Save Global State 7"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 8, TRANSLATE_NOOP("Hotkeys", "Load Global State 8"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 8, TRANSLATE_NOOP("Hotkeys", "Save Global State 8"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 9, TRANSLATE_NOOP("Hotkeys", "Load Global State 9"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 9, TRANSLATE_NOOP("Hotkeys", "Save Global State 9"))
|
||||
MAKE_LOAD_STATE_HOTKEY(true, 10, TRANSLATE_NOOP("Hotkeys", "Load Global State 10"))
|
||||
MAKE_SAVE_STATE_HOTKEY(true, 10, TRANSLATE_NOOP("Hotkeys", "Save Global State 10"))
|
||||
|
||||
#undef MAKE_SAVE_STATE_HOTKEY
|
||||
#undef MAKE_LOAD_STATE_HOTKEY
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
static const Controller::ControllerInfo s_none_info = {ControllerType::None,
|
||||
"None",
|
||||
TRANSLATABLE("ControllerType", "Not Connected"),
|
||||
TRANSLATE_NOOP("ControllerType", "Not Connected"),
|
||||
nullptr,
|
||||
0,
|
||||
nullptr,
|
||||
|
|
|
@ -169,12 +169,12 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Boolean, "ForcePopnControllerMode",
|
||||
TRANSLATABLE("DigitalController", "Force Pop'n Controller Mode"),
|
||||
TRANSLATABLE("DigitalController", "Forces the Digital Controller to act as a Pop'n Controller."), "false"}};
|
||||
TRANSLATE_NOOP("DigitalController", "Force Pop'n Controller Mode"),
|
||||
TRANSLATE_NOOP("DigitalController", "Forces the Digital Controller to act as a Pop'n Controller."), "false"}};
|
||||
|
||||
const Controller::ControllerInfo DigitalController::INFO = {ControllerType::DigitalController,
|
||||
"DigitalController",
|
||||
TRANSLATABLE("ControllerType", "Digital Controller"),
|
||||
TRANSLATE_NOOP("ControllerType", "Digital Controller"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -187,12 +187,12 @@ const char* GameDatabase::GetCompatibilityRatingName(CompatibilityRating rating)
|
|||
const char* GameDatabase::GetCompatibilityRatingDisplayName(CompatibilityRating rating)
|
||||
{
|
||||
static constexpr std::array<const char*, static_cast<size_t>(CompatibilityRating::Count)> names = {
|
||||
{TRANSLATABLE("GameListCompatibilityRating", "Unknown"),
|
||||
TRANSLATABLE("GameListCompatibilityRating", "Doesn't Boot"),
|
||||
TRANSLATABLE("GameListCompatibilityRating", "Crashes In Intro"),
|
||||
TRANSLATABLE("GameListCompatibilityRating", "Crashes In-Game"),
|
||||
TRANSLATABLE("GameListCompatibilityRating", "Graphical/Audio Issues"),
|
||||
TRANSLATABLE("GameListCompatibilityRating", "No Issues")}};
|
||||
{TRANSLATE_NOOP("GameListCompatibilityRating", "Unknown"),
|
||||
TRANSLATE_NOOP("GameListCompatibilityRating", "Doesn't Boot"),
|
||||
TRANSLATE_NOOP("GameListCompatibilityRating", "Crashes In Intro"),
|
||||
TRANSLATE_NOOP("GameListCompatibilityRating", "Crashes In-Game"),
|
||||
TRANSLATE_NOOP("GameListCompatibilityRating", "Graphical/Audio Issues"),
|
||||
TRANSLATE_NOOP("GameListCompatibilityRating", "No Issues")}};
|
||||
return (rating >= CompatibilityRating::Unknown && rating < CompatibilityRating::Count) ?
|
||||
names[static_cast<int>(rating)] :
|
||||
"";
|
||||
|
|
|
@ -105,8 +105,8 @@ const char* GameList::GetEntryTypeName(EntryType type)
|
|||
const char* GameList::GetEntryTypeDisplayName(EntryType type)
|
||||
{
|
||||
static std::array<const char*, static_cast<int>(EntryType::Count)> names = {
|
||||
{TRANSLATABLE("GameList", "Disc"), TRANSLATABLE("GameList", "PS-EXE"), TRANSLATABLE("GameList", "Playlist"),
|
||||
TRANSLATABLE("GameList", "PSF")}};
|
||||
{TRANSLATE_NOOP("GameList", "Disc"), TRANSLATE_NOOP("GameList", "PS-EXE"), TRANSLATE_NOOP("GameList", "Playlist"),
|
||||
TRANSLATE_NOOP("GameList", "PSF")}};
|
||||
return names[static_cast<int>(type)];
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ bool GPU_HW::Initialize()
|
|||
if (m_multisamples != g_settings.gpu_multisamples)
|
||||
{
|
||||
Host::AddFormattedOSDMessage(20.0f,
|
||||
Host::TranslateString("OSDMessage", "%ux MSAA is not supported, using %ux instead."),
|
||||
TRANSLATE("OSDMessage", "%ux MSAA is not supported, using %ux instead."),
|
||||
g_settings.gpu_multisamples, m_multisamples);
|
||||
}
|
||||
if (!m_per_sample_shading && g_settings.gpu_per_sample_shading)
|
||||
|
@ -87,7 +87,7 @@ bool GPU_HW::Initialize()
|
|||
if (!m_supports_dual_source_blend && TextureFilterRequiresDualSourceBlend(m_texture_filtering))
|
||||
{
|
||||
Host::AddFormattedOSDMessage(
|
||||
20.0f, Host::TranslateString("OSDMessage", "Texture filter '%s' is not supported with the current renderer."),
|
||||
20.0f, TRANSLATE("OSDMessage", "Texture filter '%s' is not supported with the current renderer."),
|
||||
Settings::GetTextureFilterDisplayName(m_texture_filtering));
|
||||
m_texture_filtering = GPUTextureFilter::Nearest;
|
||||
}
|
||||
|
|
|
@ -220,18 +220,18 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
};
|
||||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Path, "CrosshairImagePath", TRANSLATABLE("GunCon", "Crosshair Image Path"),
|
||||
TRANSLATABLE("GunCon", "Path to an image to use as a crosshair/cursor.")},
|
||||
{SettingInfo::Type::Float, "CrosshairScale", TRANSLATABLE("GunCon", "Crosshair Image Scale"),
|
||||
TRANSLATABLE("GunCon", "Scale of crosshair image on screen."), "1.0", "0.0001", "100.0", "0.10", "%.0f%%", nullptr,
|
||||
{SettingInfo::Type::Path, "CrosshairImagePath", TRANSLATE_NOOP("GunCon", "Crosshair Image Path"),
|
||||
TRANSLATE_NOOP("GunCon", "Path to an image to use as a crosshair/cursor.")},
|
||||
{SettingInfo::Type::Float, "CrosshairScale", TRANSLATE_NOOP("GunCon", "Crosshair Image Scale"),
|
||||
TRANSLATE_NOOP("GunCon", "Scale of crosshair image on screen."), "1.0", "0.0001", "100.0", "0.10", "%.0f%%", nullptr,
|
||||
100.0f},
|
||||
{SettingInfo::Type::Float, "XScale", TRANSLATABLE("GunCon", "X Scale"),
|
||||
TRANSLATABLE("GunCon", "Scales X coordinates relative to the center of the screen."), "1.0", "0.01", "2.0", "0.01",
|
||||
{SettingInfo::Type::Float, "XScale", TRANSLATE_NOOP("GunCon", "X Scale"),
|
||||
TRANSLATE_NOOP("GunCon", "Scales X coordinates relative to the center of the screen."), "1.0", "0.01", "2.0", "0.01",
|
||||
"%.0f%%", nullptr, 100.0f}};
|
||||
|
||||
const Controller::ControllerInfo GunCon::INFO = {ControllerType::GunCon,
|
||||
"GunCon",
|
||||
TRANSLATABLE("ControllerType", "GunCon"),
|
||||
TRANSLATE_NOOP("ControllerType", "GunCon"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -20,10 +20,14 @@ enum class AudioStretchMode : u8;
|
|||
class AudioStream;
|
||||
class CDImage;
|
||||
|
||||
/// Marks a core string as being translatable.
|
||||
#define TRANSLATABLE(context, str) str
|
||||
namespace Host {
|
||||
/// Typical durations for OSD messages.
|
||||
static constexpr float OSD_CRITICAL_ERROR_DURATION = 20.0f;
|
||||
static constexpr float OSD_ERROR_DURATION = 15.0f;
|
||||
static constexpr float OSD_WARNING_DURATION = 10.0f;
|
||||
static constexpr float OSD_INFO_DURATION = 5.0f;
|
||||
static constexpr float OSD_QUICK_DURATION = 2.5f;
|
||||
|
||||
namespace Host {
|
||||
/// Reads a file from the resources directory of the application.
|
||||
/// This may be outside of the "normal" filesystem on platforms such as Mac.
|
||||
std::optional<std::vector<u8>> ReadResourceFile(const char* filename);
|
||||
|
@ -38,6 +42,22 @@ std::optional<std::time_t> GetResourceFileTimestamp(const char* filename);
|
|||
TinyString TranslateString(const char* context, const char* str, const char* disambiguation = nullptr, int n = -1);
|
||||
std::string TranslateStdString(const char* context, const char* str, const char* disambiguation = nullptr, int n = -1);
|
||||
|
||||
/// Returns a localized version of the specified string within the specified context.
|
||||
/// The pointer is guaranteed to be valid until the next language change.
|
||||
const char* TranslateToCString(const std::string_view& context, const std::string_view& msg);
|
||||
|
||||
/// Returns a localized version of the specified string within the specified context.
|
||||
/// The view is guaranteed to be valid until the next language change.
|
||||
/// NOTE: When passing this to fmt, positional arguments should be used in the base string, as
|
||||
/// not all locales follow the same word ordering.
|
||||
std::string_view TranslateToStringView(const std::string_view& context, const std::string_view& msg);
|
||||
|
||||
/// Returns a localized version of the specified string within the specified context.
|
||||
std::string TranslateToString(const std::string_view& context, const std::string_view& msg);
|
||||
|
||||
/// Clears the translation cache. All previously used strings should be considered invalid.
|
||||
void ClearTranslationCache();
|
||||
|
||||
std::unique_ptr<AudioStream> CreateAudioStream(AudioBackend backend, u32 sample_rate, u32 channels, u32 buffer_ms,
|
||||
u32 latency_ms, AudioStretchMode stretch);
|
||||
|
||||
|
@ -85,3 +105,12 @@ void OpenURL(const std::string_view& url);
|
|||
/// Copies the provided text to the host's clipboard, if present.
|
||||
bool CopyTextToClipboard(const std::string_view& text);
|
||||
} // namespace Host
|
||||
|
||||
// Helper macros for retrieving translated strings.
|
||||
#define TRANSLATE(context, msg) Host::TranslateToCString(context, msg)
|
||||
#define TRANSLATE_SV(context, msg) Host::TranslateToStringView(context, msg)
|
||||
#define TRANSLATE_STR(context, msg) Host::TranslateToString(context, msg)
|
||||
#define TRANSLATE_FS(context, msg) fmt::runtime(Host::TranslateToStringView(context, msg))
|
||||
|
||||
// Does not translate the string at runtime, but allows the UI to in its own way.
|
||||
#define TRANSLATE_NOOP(context, msg) msg
|
||||
|
|
|
@ -255,17 +255,17 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
};
|
||||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Float, "SteeringDeadzone", TRANSLATABLE("NeGcon", "Steering Axis Deadzone"),
|
||||
TRANSLATABLE("NeGcon", "Sets deadzone size for steering axis."), "0.00f", "0.00f", "0.99f", "0.01f", "%.0f%%",
|
||||
{SettingInfo::Type::Float, "SteeringDeadzone", TRANSLATE_NOOP("NeGcon", "Steering Axis Deadzone"),
|
||||
TRANSLATE_NOOP("NeGcon", "Sets deadzone size for steering axis."), "0.00f", "0.00f", "0.99f", "0.01f", "%.0f%%",
|
||||
nullptr, 100.0f},
|
||||
{SettingInfo::Type::Float, "SteeringSensitivity", TRANSLATABLE("NeGcon", "Steering Axis Sensitivity"),
|
||||
TRANSLATABLE("NeGcon", "Sets the steering axis scaling factor."), "1.00f", "0.01f", "2.00f", "0.01f", "%.0f%%",
|
||||
{SettingInfo::Type::Float, "SteeringSensitivity", TRANSLATE_NOOP("NeGcon", "Steering Axis Sensitivity"),
|
||||
TRANSLATE_NOOP("NeGcon", "Sets the steering axis scaling factor."), "1.00f", "0.01f", "2.00f", "0.01f", "%.0f%%",
|
||||
nullptr, 100.0f},
|
||||
};
|
||||
|
||||
const Controller::ControllerInfo NeGcon::INFO = {ControllerType::NeGcon,
|
||||
"NeGcon",
|
||||
TRANSLATABLE("ControllerType", "NeGcon"),
|
||||
TRANSLATE_NOOP("ControllerType", "NeGcon"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -189,13 +189,13 @@ static const Controller::ControllerBindingInfo s_binding_info[] = {
|
|||
};
|
||||
|
||||
static const SettingInfo s_settings[] = {
|
||||
{SettingInfo::Type::Boolean, "RelativeMouseMode", TRANSLATABLE("PlayStationMouse", "Relative Mouse Mode"),
|
||||
TRANSLATABLE("PlayStationMouse", "Locks the mouse cursor to the window, use for FPS games."), "false"},
|
||||
{SettingInfo::Type::Boolean, "RelativeMouseMode", TRANSLATE_NOOP("PlayStationMouse", "Relative Mouse Mode"),
|
||||
TRANSLATE_NOOP("PlayStationMouse", "Locks the mouse cursor to the window, use for FPS games."), "false"},
|
||||
};
|
||||
|
||||
const Controller::ControllerInfo PlayStationMouse::INFO = {ControllerType::PlayStationMouse,
|
||||
"PlayStationMouse",
|
||||
TRANSLATABLE("ControllerType", "PlayStation Mouse"),
|
||||
TRANSLATE_NOOP("ControllerType", "PlayStation Mouse"),
|
||||
s_binding_info,
|
||||
countof(s_binding_info),
|
||||
s_settings,
|
||||
|
|
|
@ -726,10 +726,10 @@ void Settings::FixIncompatibleSettings(bool display_osd_messages)
|
|||
static std::array<const char*, LOGLEVEL_COUNT> s_log_level_names = {
|
||||
{"None", "Error", "Warning", "Perf", "Info", "Verbose", "Dev", "Profile", "Debug", "Trace"}};
|
||||
static std::array<const char*, LOGLEVEL_COUNT> s_log_level_display_names = {
|
||||
{TRANSLATABLE("LogLevel", "None"), TRANSLATABLE("LogLevel", "Error"), TRANSLATABLE("LogLevel", "Warning"),
|
||||
TRANSLATABLE("LogLevel", "Performance"), TRANSLATABLE("LogLevel", "Information"),
|
||||
TRANSLATABLE("LogLevel", "Verbose"), TRANSLATABLE("LogLevel", "Developer"), TRANSLATABLE("LogLevel", "Profile"),
|
||||
TRANSLATABLE("LogLevel", "Debug"), TRANSLATABLE("LogLevel", "Trace")}};
|
||||
{TRANSLATE_NOOP("LogLevel", "None"), TRANSLATE_NOOP("LogLevel", "Error"), TRANSLATE_NOOP("LogLevel", "Warning"),
|
||||
TRANSLATE_NOOP("LogLevel", "Performance"), TRANSLATE_NOOP("LogLevel", "Information"),
|
||||
TRANSLATE_NOOP("LogLevel", "Verbose"), TRANSLATE_NOOP("LogLevel", "Developer"), TRANSLATE_NOOP("LogLevel", "Profile"),
|
||||
TRANSLATE_NOOP("LogLevel", "Debug"), TRANSLATE_NOOP("LogLevel", "Trace")}};
|
||||
|
||||
std::optional<LOGLEVEL> Settings::ParseLogLevelName(const char* str)
|
||||
{
|
||||
|
@ -757,8 +757,8 @@ const char* Settings::GetLogLevelDisplayName(LOGLEVEL level)
|
|||
|
||||
static std::array<const char*, 4> s_console_region_names = {{"Auto", "NTSC-J", "NTSC-U", "PAL"}};
|
||||
static std::array<const char*, 4> s_console_region_display_names = {
|
||||
{TRANSLATABLE("ConsoleRegion", "Auto-Detect"), TRANSLATABLE("ConsoleRegion", "NTSC-J (Japan)"),
|
||||
TRANSLATABLE("ConsoleRegion", "NTSC-U/C (US, Canada)"), TRANSLATABLE("ConsoleRegion", "PAL (Europe, Australia)")}};
|
||||
{TRANSLATE_NOOP("ConsoleRegion", "Auto-Detect"), TRANSLATE_NOOP("ConsoleRegion", "NTSC-J (Japan)"),
|
||||
TRANSLATE_NOOP("ConsoleRegion", "NTSC-U/C (US, Canada)"), TRANSLATE_NOOP("ConsoleRegion", "PAL (Europe, Australia)")}};
|
||||
|
||||
std::optional<ConsoleRegion> Settings::ParseConsoleRegionName(const char* str)
|
||||
{
|
||||
|
@ -786,9 +786,9 @@ const char* Settings::GetConsoleRegionDisplayName(ConsoleRegion region)
|
|||
|
||||
static std::array<const char*, 5> s_disc_region_names = {{"NTSC-J", "NTSC-U", "PAL", "Other", "Non-PS1"}};
|
||||
static std::array<const char*, 5> s_disc_region_display_names = {
|
||||
{TRANSLATABLE("DiscRegion", "NTSC-J (Japan)"), TRANSLATABLE("DiscRegion", "NTSC-U/C (US, Canada)"),
|
||||
TRANSLATABLE("DiscRegion", "PAL (Europe, Australia)"), TRANSLATABLE("DiscRegion", "Other"),
|
||||
TRANSLATABLE("DiscRegion", "Non-PS1")}};
|
||||
{TRANSLATE_NOOP("DiscRegion", "NTSC-J (Japan)"), TRANSLATE_NOOP("DiscRegion", "NTSC-U/C (US, Canada)"),
|
||||
TRANSLATE_NOOP("DiscRegion", "PAL (Europe, Australia)"), TRANSLATE_NOOP("DiscRegion", "Other"),
|
||||
TRANSLATE_NOOP("DiscRegion", "Non-PS1")}};
|
||||
|
||||
std::optional<DiscRegion> Settings::ParseDiscRegionName(const char* str)
|
||||
{
|
||||
|
@ -816,9 +816,9 @@ const char* Settings::GetDiscRegionDisplayName(DiscRegion region)
|
|||
|
||||
static std::array<const char*, 3> s_cpu_execution_mode_names = {{"Interpreter", "CachedInterpreter", "Recompiler"}};
|
||||
static std::array<const char*, 3> s_cpu_execution_mode_display_names = {
|
||||
{TRANSLATABLE("CPUExecutionMode", "Interpreter (Slowest)"),
|
||||
TRANSLATABLE("CPUExecutionMode", "Cached Interpreter (Faster)"),
|
||||
TRANSLATABLE("CPUExecutionMode", "Recompiler (Fastest)")}};
|
||||
{TRANSLATE_NOOP("CPUExecutionMode", "Interpreter (Slowest)"),
|
||||
TRANSLATE_NOOP("CPUExecutionMode", "Cached Interpreter (Faster)"),
|
||||
TRANSLATE_NOOP("CPUExecutionMode", "Recompiler (Fastest)")}};
|
||||
|
||||
std::optional<CPUExecutionMode> Settings::ParseCPUExecutionMode(const char* str)
|
||||
{
|
||||
|
@ -847,9 +847,9 @@ const char* Settings::GetCPUExecutionModeDisplayName(CPUExecutionMode mode)
|
|||
static std::array<const char*, static_cast<u32>(CPUFastmemMode::Count)> s_cpu_fastmem_mode_names = {
|
||||
{"Disabled", "MMap", "LUT"}};
|
||||
static std::array<const char*, static_cast<u32>(CPUFastmemMode::Count)> s_cpu_fastmem_mode_display_names = {
|
||||
{TRANSLATABLE("CPUFastmemMode", "Disabled (Slowest)"),
|
||||
TRANSLATABLE("CPUFastmemMode", "MMap (Hardware, Fastest, 64-Bit Only)"),
|
||||
TRANSLATABLE("CPUFastmemMode", "LUT (Faster)")}};
|
||||
{TRANSLATE_NOOP("CPUFastmemMode", "Disabled (Slowest)"),
|
||||
TRANSLATE_NOOP("CPUFastmemMode", "MMap (Hardware, Fastest, 64-Bit Only)"),
|
||||
TRANSLATE_NOOP("CPUFastmemMode", "LUT (Faster)")}};
|
||||
|
||||
std::optional<CPUFastmemMode> Settings::ParseCPUFastmemMode(const char* str)
|
||||
{
|
||||
|
@ -888,15 +888,15 @@ static constexpr auto s_gpu_renderer_names = make_array(
|
|||
"Software");
|
||||
static constexpr auto s_gpu_renderer_display_names = make_array(
|
||||
#ifdef _WIN32
|
||||
TRANSLATABLE("GPURenderer", "Hardware (D3D11)"), TRANSLATABLE("GPURenderer", "Hardware (D3D12)"),
|
||||
TRANSLATE_NOOP("GPURenderer", "Hardware (D3D11)"), TRANSLATE_NOOP("GPURenderer", "Hardware (D3D12)"),
|
||||
#endif
|
||||
#ifdef WITH_VULKAN
|
||||
TRANSLATABLE("GPURenderer", "Hardware (Vulkan)"),
|
||||
TRANSLATE_NOOP("GPURenderer", "Hardware (Vulkan)"),
|
||||
#endif
|
||||
#ifdef WITH_OPENGL
|
||||
TRANSLATABLE("GPURenderer", "Hardware (OpenGL)"),
|
||||
TRANSLATE_NOOP("GPURenderer", "Hardware (OpenGL)"),
|
||||
#endif
|
||||
TRANSLATABLE("GPURenderer", "Software"));
|
||||
TRANSLATE_NOOP("GPURenderer", "Software"));
|
||||
|
||||
std::optional<GPURenderer> Settings::ParseRendererName(const char* str)
|
||||
{
|
||||
|
@ -949,11 +949,11 @@ RenderAPI Settings::GetRenderAPIForRenderer(GPURenderer renderer)
|
|||
static constexpr auto s_texture_filter_names =
|
||||
make_array("Nearest", "Bilinear", "BilinearBinAlpha", "JINC2", "JINC2BinAlpha", "xBR", "xBRBinAlpha");
|
||||
static constexpr auto s_texture_filter_display_names = make_array(
|
||||
TRANSLATABLE("GPUTextureFilter", "Nearest-Neighbor"), TRANSLATABLE("GPUTextureFilter", "Bilinear"),
|
||||
TRANSLATABLE("GPUTextureFilter", "Bilinear (No Edge Blending)"), TRANSLATABLE("GPUTextureFilter", "JINC2 (Slow)"),
|
||||
TRANSLATABLE("GPUTextureFilter", "JINC2 (Slow, No Edge Blending)"),
|
||||
TRANSLATABLE("GPUTextureFilter", "xBR (Very Slow)"),
|
||||
TRANSLATABLE("GPUTextureFilter", "xBR (Very Slow, No Edge Blending)"));
|
||||
TRANSLATE_NOOP("GPUTextureFilter", "Nearest-Neighbor"), TRANSLATE_NOOP("GPUTextureFilter", "Bilinear"),
|
||||
TRANSLATE_NOOP("GPUTextureFilter", "Bilinear (No Edge Blending)"), TRANSLATE_NOOP("GPUTextureFilter", "JINC2 (Slow)"),
|
||||
TRANSLATE_NOOP("GPUTextureFilter", "JINC2 (Slow, No Edge Blending)"),
|
||||
TRANSLATE_NOOP("GPUTextureFilter", "xBR (Very Slow)"),
|
||||
TRANSLATE_NOOP("GPUTextureFilter", "xBR (Very Slow, No Edge Blending)"));
|
||||
|
||||
std::optional<GPUTextureFilter> Settings::ParseTextureFilterName(const char* str)
|
||||
{
|
||||
|
@ -981,8 +981,8 @@ const char* Settings::GetTextureFilterDisplayName(GPUTextureFilter filter)
|
|||
|
||||
static constexpr auto s_downsample_mode_names = make_array("Disabled", "Box", "Adaptive");
|
||||
static constexpr auto s_downsample_mode_display_names = make_array(
|
||||
TRANSLATABLE("GPUDownsampleMode", "Disabled"), TRANSLATABLE("GPUDownsampleMode", "Box (Downsample 3D/Smooth All)"),
|
||||
TRANSLATABLE("GPUDownsampleMode", "Adaptive (Preserve 3D/Smooth 2D)"));
|
||||
TRANSLATE_NOOP("GPUDownsampleMode", "Disabled"), TRANSLATE_NOOP("GPUDownsampleMode", "Box (Downsample 3D/Smooth All)"),
|
||||
TRANSLATE_NOOP("GPUDownsampleMode", "Adaptive (Preserve 3D/Smooth 2D)"));
|
||||
|
||||
std::optional<GPUDownsampleMode> Settings::ParseDownsampleModeName(const char* str)
|
||||
{
|
||||
|
@ -1010,8 +1010,8 @@ const char* Settings::GetDownsampleModeDisplayName(GPUDownsampleMode mode)
|
|||
|
||||
static std::array<const char*, 3> s_display_crop_mode_names = {{"None", "Overscan", "Borders"}};
|
||||
static std::array<const char*, 3> s_display_crop_mode_display_names = {
|
||||
{TRANSLATABLE("DisplayCropMode", "None"), TRANSLATABLE("DisplayCropMode", "Only Overscan Area"),
|
||||
TRANSLATABLE("DisplayCropMode", "All Borders")}};
|
||||
{TRANSLATE_NOOP("DisplayCropMode", "None"), TRANSLATE_NOOP("DisplayCropMode", "Only Overscan Area"),
|
||||
TRANSLATE_NOOP("DisplayCropMode", "All Borders")}};
|
||||
|
||||
std::optional<DisplayCropMode> Settings::ParseDisplayCropMode(const char* str)
|
||||
{
|
||||
|
@ -1038,8 +1038,8 @@ const char* Settings::GetDisplayCropModeDisplayName(DisplayCropMode crop_mode)
|
|||
}
|
||||
|
||||
static std::array<const char*, static_cast<size_t>(DisplayAspectRatio::Count)> s_display_aspect_ratio_names = {
|
||||
{TRANSLATABLE("DisplayAspectRatio", "Auto (Game Native)"), TRANSLATABLE("DisplayAspectRatio", "Auto (Match Window)"),
|
||||
TRANSLATABLE("DisplayAspectRatio", "Custom"), "4:3", "16:9", "19:9", "20:9", "PAR 1:1"}};
|
||||
{TRANSLATE_NOOP("DisplayAspectRatio", "Auto (Game Native)"), TRANSLATE_NOOP("DisplayAspectRatio", "Auto (Match Window)"),
|
||||
TRANSLATE_NOOP("DisplayAspectRatio", "Custom"), "4:3", "16:9", "19:9", "20:9", "PAR 1:1"}};
|
||||
static constexpr std::array<float, static_cast<size_t>(DisplayAspectRatio::Count)> s_display_aspect_ratio_values = {
|
||||
{-1.0f, -1.0f, -1.0f, 4.0f / 3.0f, 16.0f / 9.0f, 19.0f / 9.0f, 20.0f / 9.0f, -1.0f}};
|
||||
|
||||
|
@ -1091,8 +1091,8 @@ float Settings::GetDisplayAspectRatioValue() const
|
|||
static std::array<const char*, static_cast<size_t>(DisplayAlignment::Count)> s_display_alignment_names = {
|
||||
{"LeftOrTop", "Center", "RightOrBottom"}};
|
||||
static std::array<const char*, static_cast<size_t>(DisplayAlignment::Count)> s_display_alignment_display_names = {
|
||||
{TRANSLATABLE("DisplayAlignment", "Left / Top"), TRANSLATABLE("DisplayAlignment", "Center"),
|
||||
TRANSLATABLE("DisplayAlignment", "Right / Bottom")}};
|
||||
{TRANSLATE_NOOP("DisplayAlignment", "Left / Top"), TRANSLATE_NOOP("DisplayAlignment", "Center"),
|
||||
TRANSLATE_NOOP("DisplayAlignment", "Right / Bottom")}};
|
||||
|
||||
std::optional<DisplayAlignment> Settings::ParseDisplayAlignment(const char* str)
|
||||
{
|
||||
|
@ -1131,12 +1131,12 @@ static constexpr const char* s_audio_backend_names[] = {
|
|||
#endif
|
||||
};
|
||||
static constexpr const char* s_audio_backend_display_names[] = {
|
||||
TRANSLATABLE("AudioBackend", "Null (No Output)"),
|
||||
TRANSLATE_NOOP("AudioBackend", "Null (No Output)"),
|
||||
#ifdef WITH_CUBEB
|
||||
TRANSLATABLE("AudioBackend", "Cubeb"),
|
||||
TRANSLATE_NOOP("AudioBackend", "Cubeb"),
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
TRANSLATABLE("AudioBackend", "XAudio2"),
|
||||
TRANSLATE_NOOP("AudioBackend", "XAudio2"),
|
||||
#endif
|
||||
#ifdef __ANDROID__
|
||||
"AAudio",
|
||||
|
@ -1171,10 +1171,10 @@ const char* Settings::GetAudioBackendDisplayName(AudioBackend backend)
|
|||
static std::array<const char*, 7> s_controller_type_names = {
|
||||
{"None", "DigitalController", "AnalogController", "AnalogJoystick", "GunCon", "PlayStationMouse", "NeGcon"}};
|
||||
static std::array<const char*, 7> s_controller_display_names = {
|
||||
{TRANSLATABLE("ControllerType", "None"), TRANSLATABLE("ControllerType", "Digital Controller"),
|
||||
TRANSLATABLE("ControllerType", "Analog Controller (DualShock)"), TRANSLATABLE("ControllerType", "Analog Joystick"),
|
||||
TRANSLATABLE("ControllerType", "GunCon"), TRANSLATABLE("ControllerType", "PlayStation Mouse"),
|
||||
TRANSLATABLE("ControllerType", "NeGcon")}};
|
||||
{TRANSLATE_NOOP("ControllerType", "None"), TRANSLATE_NOOP("ControllerType", "Digital Controller"),
|
||||
TRANSLATE_NOOP("ControllerType", "Analog Controller (DualShock)"), TRANSLATE_NOOP("ControllerType", "Analog Joystick"),
|
||||
TRANSLATE_NOOP("ControllerType", "GunCon"), TRANSLATE_NOOP("ControllerType", "PlayStation Mouse"),
|
||||
TRANSLATE_NOOP("ControllerType", "NeGcon")}};
|
||||
|
||||
std::optional<ControllerType> Settings::ParseControllerTypeName(const char* str)
|
||||
{
|
||||
|
@ -1203,11 +1203,11 @@ const char* Settings::GetControllerTypeDisplayName(ControllerType type)
|
|||
static std::array<const char*, 6> s_memory_card_type_names = {
|
||||
{"None", "Shared", "PerGame", "PerGameTitle", "PerGameFileTitle", "NonPersistent"}};
|
||||
static std::array<const char*, 6> s_memory_card_type_display_names = {
|
||||
{TRANSLATABLE("MemoryCardType", "No Memory Card"), TRANSLATABLE("MemoryCardType", "Shared Between All Games"),
|
||||
TRANSLATABLE("MemoryCardType", "Separate Card Per Game (Serial)"),
|
||||
TRANSLATABLE("MemoryCardType", "Separate Card Per Game (Title)"),
|
||||
TRANSLATABLE("MemoryCardType", "Separate Card Per Game (File Title)"),
|
||||
TRANSLATABLE("MemoryCardType", "Non-Persistent Card (Do Not Save)")}};
|
||||
{TRANSLATE_NOOP("MemoryCardType", "No Memory Card"), TRANSLATE_NOOP("MemoryCardType", "Shared Between All Games"),
|
||||
TRANSLATE_NOOP("MemoryCardType", "Separate Card Per Game (Serial)"),
|
||||
TRANSLATE_NOOP("MemoryCardType", "Separate Card Per Game (Title)"),
|
||||
TRANSLATE_NOOP("MemoryCardType", "Separate Card Per Game (File Title)"),
|
||||
TRANSLATE_NOOP("MemoryCardType", "Non-Persistent Card (Do Not Save)")}};
|
||||
|
||||
std::optional<MemoryCardType> Settings::ParseMemoryCardTypeName(const char* str)
|
||||
{
|
||||
|
@ -1259,8 +1259,8 @@ std::string Settings::GetGameMemoryCardPath(const char* serial, u32 slot)
|
|||
|
||||
static std::array<const char*, 4> s_multitap_enable_mode_names = {{"Disabled", "Port1Only", "Port2Only", "BothPorts"}};
|
||||
static std::array<const char*, 4> s_multitap_enable_mode_display_names = {
|
||||
{TRANSLATABLE("MultitapMode", "Disabled"), TRANSLATABLE("MultitapMode", "Enable on Port 1 Only"),
|
||||
TRANSLATABLE("MultitapMode", "Enable on Port 2 Only"), TRANSLATABLE("MultitapMode", "Enable on Ports 1 and 2")}};
|
||||
{TRANSLATE_NOOP("MultitapMode", "Disabled"), TRANSLATE_NOOP("MultitapMode", "Enable on Port 1 Only"),
|
||||
TRANSLATE_NOOP("MultitapMode", "Enable on Port 2 Only"), TRANSLATE_NOOP("MultitapMode", "Enable on Ports 1 and 2")}};
|
||||
|
||||
std::optional<MultitapMode> Settings::ParseMultitapModeName(const char* str)
|
||||
{
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include <utility>
|
||||
|
||||
static constexpr std::array<const char*, 6> s_size_strings = {
|
||||
{TRANSLATABLE("CheatManagerDialog", "Byte"), TRANSLATABLE("CheatManagerDialog", "Halfword"),
|
||||
TRANSLATABLE("CheatManagerDialog", "Word"), TRANSLATABLE("CheatManagerDialog", "Signed Byte"),
|
||||
TRANSLATABLE("CheatManagerDialog", "Signed Halfword"), TRANSLATABLE("CheatManagerDialog", "Signed Word")}};
|
||||
{TRANSLATE_NOOP("CheatManagerDialog", "Byte"), TRANSLATE_NOOP("CheatManagerDialog", "Halfword"),
|
||||
TRANSLATE_NOOP("CheatManagerDialog", "Word"), TRANSLATE_NOOP("CheatManagerDialog", "Signed Byte"),
|
||||
TRANSLATE_NOOP("CheatManagerDialog", "Signed Halfword"), TRANSLATE_NOOP("CheatManagerDialog", "Signed Word")}};
|
||||
|
||||
static QString formatHexValue(u32 value, u8 size)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ static constexpr char MEMORY_CARD_IMAGE_FILTER[] = QT_TRANSLATE_NOOP(
|
|||
static constexpr char MEMORY_CARD_IMPORT_FILTER[] =
|
||||
QT_TRANSLATE_NOOP("MemoryCardEditorDialog", "All Importable Memory Card Types (*.mcd *.mcr *.mc *.gme)");
|
||||
static constexpr char SINGLE_SAVEFILE_FILTER[] =
|
||||
TRANSLATABLE("MemoryCardEditorDialog", "Single Save Files (*.mcs);;All Files (*.*)");
|
||||
TRANSLATE_NOOP("MemoryCardEditorDialog", "Single Save Files (*.mcs);;All Files (*.*)");
|
||||
|
||||
MemoryCardEditorDialog::MemoryCardEditorDialog(QWidget* parent) : QDialog(parent)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue