From c20fac3596c87c8932a6f680357b9b5df6856347 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 3 Sep 2023 18:24:55 +0200 Subject: [PATCH] fix min size code (commented out for now) --- src/wndproc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/wndproc.c b/src/wndproc.c index 2475a95..fa753cf 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -56,7 +56,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam if (g_ddraw->windowed && g_ddraw->width) { - RECT rc = { 0, 0, g_ddraw->width, g_ddraw->height }; + RECT rc = { 0, 0, g_ddraw->render.width, g_ddraw->render.height }; AdjustWindowRectEx( &rc, @@ -64,16 +64,25 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam GetMenu(g_ddraw->hwnd) != NULL, real_GetWindowLongA(g_ddraw->hwnd, GWL_EXSTYLE)); - // set minimum window size - //mmi->ptMinTrackSize.x = rc.right - rc.left; - //mmi->ptMinTrackSize.y = rc.bottom - rc.top; - if (mmi->ptMaxTrackSize.x < rc.right - rc.left) mmi->ptMaxTrackSize.x = rc.right - rc.left; if (mmi->ptMaxTrackSize.y < rc.bottom - rc.top) mmi->ptMaxTrackSize.y = rc.bottom - rc.top; + /* + RECT rcmin = { 0, 0, g_ddraw->width, g_ddraw->height }; + + AdjustWindowRectEx( + &rcmin, + real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE), + GetMenu(g_ddraw->hwnd) != NULL, + real_GetWindowLongA(g_ddraw->hwnd, GWL_EXSTYLE)); + + mmi->ptMinTrackSize.x = rcmin.right - rcmin.left; + mmi->ptMinTrackSize.y = rcmin.bottom - rcmin.top; + */ + return 0; }