source/Platform/Win32/Win32Display.cpp: Use calculateSize() in setSize()
This commit is contained in:
parent
80591ff6ee
commit
ea4267ef2d
1 changed files with 2 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue