GS: Add hotkey for cycling TV shaders

This commit is contained in:
SternXD
2025-07-02 15:45:31 -04:00
committed by TellowKrinkle
parent e546acec1e
commit fe9794ba53
2 changed files with 26 additions and 0 deletions

View File

@@ -1213,6 +1213,31 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys){"Screenshot", TRANSLATE_NOOP("Hotkeys", "Graphic
MTGS::RunOnGSThread([new_mode]() { GSConfig.InterlaceMode = new_mode; });
}},
{"CycleTVShader", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle TV Shader"),
[](s32 pressed) {
if (pressed)
return;
static constexpr std::array<const char*, 8> option_names = {{
TRANSLATE_NOOP("Hotkeys", "None (Default)"),
TRANSLATE_NOOP("Hotkeys", "Scanline Filter"),
TRANSLATE_NOOP("Hotkeys", "Diagonal Filter"),
TRANSLATE_NOOP("Hotkeys", "Triangular Filter"),
TRANSLATE_NOOP("Hotkeys", "Wave Filter"),
TRANSLATE_NOOP("Hotkeys", "Lottes CRT"),
TRANSLATE_NOOP("Hotkeys", "4xRGSS"),
TRANSLATE_NOOP("Hotkeys", "NxAGSS"),
}};
const u32 new_shader = (EmuConfig.GS.TVShader + 1) % 8;
Host::AddKeyedOSDMessage("CycleTVShader",
fmt::format(
TRANSLATE_FS("Hotkeys", "TV shader set to '{}'."), option_names[new_shader]),
Host::OSD_QUICK_DURATION);
EmuConfig.GS.TVShader = new_shader;
MTGS::RunOnGSThread([new_shader]() { GSConfig.TVShader = new_shader; });
}},
{"ToggleTextureDumping", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle Texture Dumping"),
[](s32 pressed) {
if (!pressed)

View File

@@ -223,6 +223,7 @@ void Pad::SetDefaultHotkeyConfig(SettingsInterface& si)
// PCSX2 Controller Settings - Hotkeys - Graphics
si.SetStringValue("Hotkeys", "CycleAspectRatio", "Keyboard/F6");
si.SetStringValue("Hotkeys", "CycleInterlaceMode", "Keyboard/F5");
// si.SetStringValue("Hotkeys", "CycleTVShader", "Keyboard/"); TBD
si.SetStringValue("Hotkeys", "ToggleMipmapMode", "Keyboard/Insert");
// si.SetStringValue("Hotkeys", "DecreaseUpscaleMultiplier", "Keyboard"); TBD
// si.SetStringValue("Hotkeys", "IncreaseUpscaleMultiplier", "Keyboard"); TBD