summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2018-01-26 16:23:24 +1000
committerStenzek <stenzek@gmail.com>2018-02-20 01:15:55 +1000
commitde632fc9c8d7d026ccad1afc2f72224ee9639023 (patch)
treecf182d393ccde05c26d3fa27bc7007e134fbadda /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parent5baf3bbe2e2fb62cac9c1bb4cded45644ebfd3bb (diff)
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.
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index c78a67589a..def748832f 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -321,12 +321,8 @@ class PlatformX11 : public Platform
{
last_window_width = event.xconfigure.width;
last_window_height = event.xconfigure.height;
-
- // We call Renderer::ChangeSurface here to indicate the size has changed,
- // but pass the same window handle. This is needed for the Vulkan backend,
- // otherwise it cannot tell that the window has been resized on some drivers.
if (g_renderer)
- g_renderer->ChangeSurface(s_window_handle);
+ g_renderer->ResizeSurface(last_window_width, last_window_height);
}
}
break;