1
0
Fork 0

source/Platform/Win32/Win32Display: Adding calculateSize()

This commit is contained in:
Henrik Hautakoski 2023-08-03 15:23:19 +02:00
parent 76aa838e8e
commit 80591ff6ee
2 changed files with 9 additions and 0 deletions

View file

@ -284,6 +284,13 @@ Vector2i Win32Display::centerWindow(int width, int height)
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)
{
LONG rc;