Hotkey: Add Cycle Blending Accuracy

Update GS.cpp
This commit is contained in:
KamFretoZ
2026-03-12 18:35:17 +01:00
committed by lightningterror
parent 2f7be602c8
commit 0b5c37e1c5
3 changed files with 28 additions and 2 deletions
+1
View File
@@ -335,6 +335,7 @@ enum class AccBlendLevel : u8
High,
Full,
Maximum,
MaxCount
};
enum class OsdOverlayPos : u8
+26 -2
View File
@@ -1259,8 +1259,8 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys){"Screenshot", TRANSLATE_NOOP("Hotkeys", "Graphic
fmt::format(
TRANSLATE_FS("Hotkeys", "Deinterlace mode set to '{}'."), option_names[static_cast<s32>(new_mode)]),
Host::OSD_QUICK_DURATION);
EmuConfig.GS.InterlaceMode = new_mode;
EmuConfig.GS.InterlaceMode = new_mode;
MTGS::RunOnGSThread([new_mode]() { GSConfig.InterlaceMode = new_mode; });
}},
{"CycleTVShader", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle TV Shader"),
@@ -1284,10 +1284,34 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys){"Screenshot", TRANSLATE_NOOP("Hotkeys", "Graphic
fmt::format(
TRANSLATE_FS("Hotkeys", "TV shader set to '{}'."), option_names[new_shader]),
Host::OSD_QUICK_DURATION);
EmuConfig.GS.TVShader = new_shader;
EmuConfig.GS.TVShader = new_shader;
MTGS::RunOnGSThread([new_shader]() { GSConfig.TVShader = new_shader; });
}},
{"CycleBlendingAccuracy", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle Blending Accuracy"),
[](s32 pressed) {
if (pressed)
return;
static constexpr std::array<const char*, static_cast<u8>(AccBlendLevel::MaxCount)> s_blending_option_names = {{
TRANSLATE_NOOP("Hotkeys", "Minimum"),
TRANSLATE_NOOP("Hotkeys", "Basic"),
TRANSLATE_NOOP("Hotkeys", "Medium"),
TRANSLATE_NOOP("Hotkeys", "High"),
TRANSLATE_NOOP("Hotkeys", "Full"),
TRANSLATE_NOOP("Hotkeys", "Maximum"),
}};
const AccBlendLevel new_blend_mode = static_cast<AccBlendLevel>(
(static_cast<u8>(EmuConfig.GS.AccurateBlendingUnit) + 1) % static_cast<u8>(AccBlendLevel::MaxCount));
Host::AddKeyedOSDMessage("CycleBlendingAccuracy",
fmt::format(
TRANSLATE_FS("Hotkeys", "Blending Accuracy set to {}."), s_blending_option_names[static_cast<u8>(new_blend_mode)]),
Host::OSD_QUICK_DURATION);
EmuConfig.GS.AccurateBlendingUnit = new_blend_mode;
MTGS::RunOnGSThread([new_blend_mode]() { GSConfig.AccurateBlendingUnit = new_blend_mode; });
}},
{"ToggleTextureDumping", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle Texture Dumping"),
[](s32 pressed) {
if (!pressed)
+1
View File
@@ -224,6 +224,7 @@ void Pad::SetDefaultHotkeyConfig(SettingsInterface& si)
si.SetStringValue("Hotkeys", "CycleAspectRatio", "Keyboard/F6");
si.SetStringValue("Hotkeys", "CycleInterlaceMode", "Keyboard/F5");
// si.SetStringValue("Hotkeys", "CycleTVShader", "Keyboard/"); TBD
// si.SetStringValue("Hotkeys", "CycleBlendingAccuracy", "Keyboard/"); TBD
si.SetStringValue("Hotkeys", "ToggleMipmapMode", "Keyboard/Insert");
// si.SetStringValue("Hotkeys", "DecreaseUpscaleMultiplier", "Keyboard"); TBD
// si.SetStringValue("Hotkeys", "IncreaseUpscaleMultiplier", "Keyboard"); TBD