Qt: Add hotkey for increasing/decreasing resolution scale

This commit is contained in:
Connor McLaughlin 2020-01-24 14:51:57 +10:00
parent 40799d0f77
commit 1ed187fd57
1 changed files with 14 additions and 1 deletions

View File

@ -346,7 +346,10 @@ std::vector<QtHostInterface::HotkeyInfo> QtHostInterface::getHotkeyList() const
{QStringLiteral("Pause"), QStringLiteral("Toggle Pause"), QStringLiteral("General")},
{QStringLiteral("ToggleSoftwareRendering"), QStringLiteral("Toggle Software Rendering"),
QStringLiteral("Graphics")},
};
{QStringLiteral("IncreaseResolutionScale"), QStringLiteral("Increase Resolution Scale"),
QStringLiteral("Graphics")},
{QStringLiteral("DecreaseResolutionScale"), QStringLiteral("Decrease Resolution Scale"),
QStringLiteral("Graphics")}};
for (u32 i = 1; i <= NUM_SAVE_STATE_HOTKEYS; i++)
{
@ -392,6 +395,16 @@ void QtHostInterface::updateHotkeyInputMap()
ToggleSoftwareRendering();
});
hk(QStringLiteral("IncreaseResolutionScale"), [this](bool pressed) {
if (!pressed)
ModifyResolutionScale(1);
});
hk(QStringLiteral("DecreaseResolutionScale"), [this](bool pressed) {
if (!pressed)
ModifyResolutionScale(-1);
});
for (u32 i = 1; i <= NUM_SAVE_STATE_HOTKEYS; i++)
{
hk(QStringLiteral("LoadState%1").arg(i), [this, i](bool pressed) {