# HG changeset patch # User Joshua Surace # Date 1631097369 -36000 # Wed Sep 08 20:36:09 2021 +1000 # Node ID 28bd9c2e31ad56c0d13b74b04b3e246c47cfc907 # Parent 0c5409c72f6ea86be0e5f274f4e5c8934af5319a Fixed the screen from being cut-off while running in windowed mode. diff -r 0c5409c72f6e -r 28bd9c2e31ad src/win32/win32gliface.cpp --- a/src/win32/win32gliface.cpp Thu Jul 02 23:43:45 2020 +0200 +++ b/src/win32/win32gliface.cpp Wed Sep 08 20:36:09 2021 +1000 @@ -895,8 +895,16 @@ } else { - MoveWindow(Window, r.left, r.top, width + (GetSystemMetrics(SM_CXSIZEFRAME) * 2), height + (GetSystemMetrics(SM_CYSIZEFRAME) * 2) + GetSystemMetrics(SM_CYCAPTION), FALSE); + //[JS] Fixed the screen from being cut-off while running in windowed mode. + RECT windowRect; + windowRect.left = r.left; + windowRect.top = r.top; + windowRect.right = windowRect.left + width; + windowRect.bottom = windowRect.top + height; + AdjustWindowRectEx(&windowRect, style, FALSE, exStyle); + MoveWindow(Window, windowRect.left, windowRect.top, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, FALSE); + I_RestoreWindowedPos(); } @@ -1080,7 +1088,6 @@ } } - IVideo *gl_CreateVideo() { return new Win32GLVideo(0);