FrontendCommon: Add a hotkey to reload post processing
This commit is contained in:
@ -1438,6 +1438,12 @@ void CommonHostInterface::RegisterGraphicsHotkeys()
|
||||
if (!pressed)
|
||||
ModifyResolutionScale(-1);
|
||||
});
|
||||
|
||||
RegisterHotkey(StaticString("Graphics"), StaticString("ReloadPostProcessingShaders"),
|
||||
StaticString(TRANSLATABLE("Hotkeys", "Reload Post Processing Shaders")), [this](bool pressed) {
|
||||
if (!pressed)
|
||||
ReloadPostProcessingShaders();
|
||||
});
|
||||
}
|
||||
|
||||
void CommonHostInterface::RegisterSaveStateHotkeys()
|
||||
@ -2265,6 +2271,17 @@ void CommonHostInterface::ApplyCheatCode(u32 index)
|
||||
}
|
||||
}
|
||||
|
||||
void CommonHostInterface::ReloadPostProcessingShaders()
|
||||
{
|
||||
if (!m_display)
|
||||
return;
|
||||
|
||||
if (!m_display->SetPostProcessingChain(g_settings.display_post_process_chain))
|
||||
AddOSDMessage(TranslateStdString("OSDMessage", "Failed to load post processing shader chain."), 20.0f);
|
||||
else
|
||||
AddOSDMessage(TranslateStdString("OSDMessage", "Post processing shaders reloaded."), 10.0f);
|
||||
}
|
||||
|
||||
#ifdef WITH_DISCORD_PRESENCE
|
||||
|
||||
void CommonHostInterface::SetDiscordPresenceEnabled(bool enabled)
|
||||
|
||||
Reference in New Issue
Block a user