From f408dc72e74c34747075c0099e01898119068e84 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sun, 15 Jun 2014 14:59:25 +0200 Subject: [PATCH] Fix OpenGL video backend when using "render to main" on Windows. --- Source/Core/DolphinWX/GLInterface/WGL.cpp | 27 +++-------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/Source/Core/DolphinWX/GLInterface/WGL.cpp b/Source/Core/DolphinWX/GLInterface/WGL.cpp index adeb48e05e..6ae2e88af7 100644 --- a/Source/Core/DolphinWX/GLInterface/WGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/WGL.cpp @@ -145,32 +145,11 @@ bool cInterfaceWGL::ClearCurrent() void cInterfaceWGL::Update() { RECT rcWindow; - HWND parent = GetParent((HWND)m_window_handle); - if (!parent) - { - // We are not rendering to a child window - use client size. - GetClientRect((HWND)m_window_handle, &rcWindow); - } - else - { - // We are rendering to a child window - use parent size. - GetWindowRect(parent, &rcWindow); - } + GetClientRect((HWND)m_window_handle, &rcWindow); // Get the new window width and height - // See below for documentation - int width = rcWindow.right - rcWindow.left; - int height = rcWindow.bottom - rcWindow.top; - - // If we are rendering to a child window - if (GetParent((HWND)m_window_handle) != 0 && - (s_backbuffer_width != width || s_backbuffer_height != height) && - width >= 4 && height >= 4) - { - ::MoveWindow((HWND)m_window_handle, 0, 0, width, height, FALSE); - s_backbuffer_width = width; - s_backbuffer_height = height; - } + s_backbuffer_width = rcWindow.right - rcWindow.left; + s_backbuffer_height = rcWindow.bottom - rcWindow.top; } // Close backend