source/Platform/Win32/Win32Display: Adding calculateSize()
This commit is contained in:
parent
76aa838e8e
commit
80591ff6ee
2 changed files with 9 additions and 0 deletions
|
|
@ -284,6 +284,13 @@ Vector2i Win32Display::centerWindow(int width, int height)
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector2u Win32Display::calculateSize(DWORD flags, LONG width, LONG height)
|
||||||
|
{
|
||||||
|
RECT r = {0, 0, width, height};
|
||||||
|
AdjustWindowRect(&r, flags, false);
|
||||||
|
return Vector2u(r.right - r.left, r.bottom - r.top);
|
||||||
|
}
|
||||||
|
|
||||||
void Win32Display::enterFullscreen(DisplayMode mode)
|
void Win32Display::enterFullscreen(DisplayMode mode)
|
||||||
{
|
{
|
||||||
LONG rc;
|
LONG rc;
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ protected :
|
||||||
|
|
||||||
void registerClass();
|
void registerClass();
|
||||||
|
|
||||||
|
Vector2u calculateSize(DWORD flags, LONG width, LONG height);
|
||||||
|
|
||||||
DWORD getWin32Flags(unsigned int flags);
|
DWORD getWin32Flags(unsigned int flags);
|
||||||
|
|
||||||
Vector2i centerWindow(int width, int height);
|
Vector2i centerWindow(int width, int height);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue