diff --git a/source/Platform/Win32/Win32Display.cpp b/source/Platform/Win32/Win32Display.cpp index 7e89676..eeecffe 100644 --- a/source/Platform/Win32/Win32Display.cpp +++ b/source/Platform/Win32/Win32Display.cpp @@ -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; diff --git a/source/Platform/Win32/Win32Display.h b/source/Platform/Win32/Win32Display.h index 510c275..5d7b4fe 100644 --- a/source/Platform/Win32/Win32Display.h +++ b/source/Platform/Win32/Win32Display.h @@ -55,6 +55,8 @@ protected : void registerClass(); + Vector2u calculateSize(DWORD flags, LONG width, LONG height); + DWORD getWin32Flags(unsigned int flags); Vector2i centerWindow(int width, int height);