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

@ -370,6 +370,10 @@ bool SDLHostInterface::SetFullscreen(bool enabled)
int window_width, window_height;
SDL_GetWindowSize(m_window, &window_width, &window_height);
m_display->ResizeRenderWindow(window_width, window_height);
if (!System::IsShutdown())
g_gpu->UpdateResolutionScale();
m_fullscreen = enabled;
return true;
}
@ -523,6 +527,9 @@ void SDLHostInterface::HandleSDLEvent(const SDL_Event* event)
{
m_display->ResizeRenderWindow(event->window.data1, event->window.data2);
UpdateFramebufferScale();
if (!System::IsShutdown())
g_gpu->UpdateResolutionScale();
}
else if (event->window.event == SDL_WINDOWEVENT_MOVED)
{