GS: Fix aspect ratio cycle hotkey in Qt

This commit is contained in:
Connor McLaughlin 2022-05-16 19:03:04 +10:00 committed by refractionpcsx2
parent 8c270288de
commit 0f8bbfd64c
1 changed files with 3 additions and 4 deletions

View File

@ -1608,10 +1608,9 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys)
if (pressed)
return;
GetMTGS().RunOnGSThread([]() {
GSConfig.AspectRatio = static_cast<AspectRatioType>((static_cast<int>(GSConfig.AspectRatio) + 1) % static_cast<int>(AspectRatioType::MaxCount));
Host::AddKeyedFormattedOSDMessage("CycleAspectRatio", 10.0f, "Aspect ratio set to '%s'.", Pcsx2Config::GSOptions::AspectRatioNames[static_cast<int>(GSConfig.AspectRatio)]);
});
// technically this races, but the worst that'll happen is one frame uses the old AR.
EmuConfig.CurrentAspectRatio = static_cast<AspectRatioType>((static_cast<int>(EmuConfig.CurrentAspectRatio) + 1) % static_cast<int>(AspectRatioType::MaxCount));
Host::AddKeyedFormattedOSDMessage("CycleAspectRatio", 10.0f, "Aspect ratio set to '%s'.", Pcsx2Config::GSOptions::AspectRatioNames[static_cast<int>(EmuConfig.CurrentAspectRatio)]);
}},
{"CycleMipmapMode", "Graphics", "Cycle Hardware Mipmapping", [](bool pressed) {
if (pressed)