Renderer: Pull dimensions from GLInterface/Swapchain

This commit is contained in:
Stenzek
2018-10-03 23:03:16 +10:00
parent a3961750a7
commit 1d827a5223
7 changed files with 7 additions and 26 deletions

View File

@ -209,9 +209,6 @@ class PlatformX11 : public Platform
void MainLoop() override
{
bool fullscreen = SConfig::GetInstance().bFullscreen;
int last_window_width = SConfig::GetInstance().iRenderWindowWidth;
int last_window_height = SConfig::GetInstance().iRenderWindowHeight;
if (fullscreen)
{
rendererIsFullscreen = X11Utils::ToggleFullscreen(dpy, win);
@ -311,14 +308,8 @@ class PlatformX11 : public Platform
break;
case ConfigureNotify:
{
if (last_window_width != event.xconfigure.width ||
last_window_height != event.xconfigure.height)
{
last_window_width = event.xconfigure.width;
last_window_height = event.xconfigure.height;
if (g_renderer)
g_renderer->ResizeSurface(last_window_width, last_window_height);
}
if (g_renderer)
g_renderer->ResizeSurface();
}
break;
}