GS: Reset/restore API state when changing OSD scale

Closes https://github.com/PCSX2/pcsx2/issues/5451
This commit is contained in:
Connor McLaughlin 2022-02-02 20:43:49 +10:00 committed by refractionpcsx2
parent 5d3cbf8d1a
commit f1de985304
1 changed files with 4 additions and 0 deletions

View File

@ -715,7 +715,11 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
// Handle OSD scale changes by pushing a window resize through.
if (new_config.OsdScale != old_config.OsdScale)
{
g_gs_device->ResetAPIState();
Host::ResizeHostDisplay(display->GetWindowWidth(), display->GetWindowHeight(), display->GetWindowScale());
g_gs_device->RestoreAPIState();
}
// Options which need a full teardown/recreate.
if (!GSConfig.RestartOptionsAreEqual(old_config))