mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Renderer: Handle resize events on-demand instead of polling
We now differentiate between a resize event and surface change/destroyed event, reducing the overhead for resizes in the Vulkan backend. It is also now now safe to change the surface multiple times if the video thread is lagging behind.
This commit is contained in:
@ -51,10 +51,10 @@ void Host::SetRenderFullscreen(bool fullscreen)
|
||||
m_render_fullscreen = fullscreen;
|
||||
}
|
||||
|
||||
void Host::UpdateSurface()
|
||||
void Host::ResizeSurface(int new_width, int new_height)
|
||||
{
|
||||
if (g_renderer)
|
||||
g_renderer->ChangeSurface(GetRenderHandle());
|
||||
g_renderer->ResizeSurface(new_width, new_height);
|
||||
}
|
||||
|
||||
void Host_Message(int id)
|
||||
|
Reference in New Issue
Block a user