GPU/HW: Implement automatic resolution scale from window size

This commit is contained in:
Connor McLaughlin
2020-08-03 03:06:03 +10:00
parent 94777a15cd
commit 9b7512f7b8
6 changed files with 51 additions and 13 deletions

View File

@ -425,7 +425,10 @@ void QtHostInterface::onHostDisplayWindowResized(int width, int height)
// re-render the display, since otherwise it will be out of date and stretched if paused
if (!System::IsShutdown())
{
g_gpu->UpdateResolutionScale();
renderDisplay();
}
}
void QtHostInterface::redrawDisplayWindow()
@ -538,7 +541,12 @@ void QtHostInterface::updateDisplayState()
Panic("Failed to make device context current after updating");
connectDisplaySignals(display_widget);
redrawDisplayWindow();
if (!System::IsShutdown())
{
g_gpu->UpdateResolutionScale();
redrawDisplayWindow();
}
UpdateSpeedLimiterState();
}