diff --git a/source/Platform/Win32/Win32Display.cpp b/source/Platform/Win32/Win32Display.cpp index eeecffe..78f4be0 100644 --- a/source/Platform/Win32/Win32Display.cpp +++ b/source/Platform/Win32/Win32Display.cpp @@ -91,14 +91,8 @@ bool Win32Display::isValid() void Win32Display::setSize(unsigned int width, unsigned int height) { - int w, h; - RECT rect = {0, 0, (LONG) width, (LONG) height}; - AdjustWindowRect(&rect, GetWindowLong(m_handle, GWL_STYLE), false); - - w = rect.right - rect.left; - h = rect.bottom - rect.top; - - ::SetWindowPos(m_handle, NULL, 0, 0, w, h, SWP_NOMOVE | SWP_NOZORDER); + Vector2i s = calculateSize(GetWindowLong(m_handle, GWL_STYLE), width, height); + ::SetWindowPos(m_handle, NULL, 0, 0, s.x, s.y, SWP_NOMOVE | SWP_NOZORDER); } Vector2u Win32Display::getSize() const