CommonHostInterface: Add Screenshot hotkey

This commit is contained in:
Connor McLaughlin 2020-03-18 22:28:03 +10:00
parent afe2f96474
commit 1ee68ad12a
1 changed files with 8 additions and 1 deletions

View File

@ -84,9 +84,10 @@ void CommonHostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetStringValue("Controller1", "ButtonR1", "Keyboard/E");
si.SetStringValue("Controller1", "ButtonR2", "Keyboard/3");
si.SetStringValue("Hotkeys", "FastForward", "Keyboard/Tab");
si.SetStringValue("Hotkeys", "PowerOff", "Keyboard/Escape");
si.SetStringValue("Hotkeys", "TogglePause", "Keyboard/Pause");
si.SetStringValue("Hotkeys", "ToggleFullscreen", "Keyboard/Alt+Return");
si.SetStringValue("Hotkeys", "PowerOff", "Keyboard/Escape");
si.SetStringValue("Hotkeys", "Screenshot", "Keyboard/F10");
si.SetStringValue("Hotkeys", "IncreaseResolutionScale", "Keyboard/PageUp");
si.SetStringValue("Hotkeys", "DecreaseResolutionScale", "Keyboard/PageDown");
si.SetStringValue("Hotkeys", "ToggleSoftwareRendering", "Keyboard/End");
@ -351,6 +352,12 @@ void CommonHostInterface::RegisterGeneralHotkeys()
PowerOffSystem();
}
});
RegisterHotkey(StaticString("General"), StaticString("Screenshot"), StaticString("Save Screenshot"),
[this](bool pressed) {
if (!pressed && m_system)
SaveScreenshot();
});
}
void CommonHostInterface::RegisterGraphicsHotkeys()