Qt: Add hotkey to toggle software rendering

This commit is contained in:
Connor McLaughlin 2020-01-24 14:51:55 +10:00
parent 4a3478b360
commit 8148486a9f

View file

@ -343,7 +343,10 @@ std::vector<QtHostInterface::HotkeyInfo> QtHostInterface::getHotkeyList() const
std::vector<HotkeyInfo> hotkeys = {
{QStringLiteral("FastForward"), QStringLiteral("Toggle Fast Forward"), QStringLiteral("General")},
{QStringLiteral("Fullscreen"), QStringLiteral("Toggle Fullscreen"), QStringLiteral("General")},
{QStringLiteral("Pause"), QStringLiteral("Toggle Pause"), QStringLiteral("General")}};
{QStringLiteral("Pause"), QStringLiteral("Toggle Pause"), QStringLiteral("General")},
{QStringLiteral("ToggleSoftwareRendering"), QStringLiteral("Toggle Software Rendering"),
QStringLiteral("Graphics")},
};
for (u32 i = 1; i <= NUM_SAVE_STATE_HOTKEYS; i++)
{
@ -384,6 +387,11 @@ void QtHostInterface::updateHotkeyInputMap()
pauseSystem(!m_paused);
});
hk(QStringLiteral("ToggleSoftwareRendering"), [this](bool pressed) {
if (!pressed)
ToggleSoftwareRendering();
});
for (u32 i = 1; i <= NUM_SAVE_STATE_HOTKEYS; i++)
{
hk(QStringLiteral("LoadState%1").arg(i), [this, i](bool pressed) {