From 7f67f1c03fc735dbc776d36423153165716407c1 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 16 Nov 2018 00:40:34 +0100 Subject: [PATCH] no resizable window for wine, sorry :( --- ddraw.rc | 2 +- src/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ddraw.rc b/ddraw.rc index 305c016..6eb967e 100644 --- a/ddraw.rc +++ b/ddraw.rc @@ -4,7 +4,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_BUILD 5 -#define VERSION_REVISION 2 +#define VERSION_REVISION 3 #define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION #define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION) diff --git a/src/main.c b/src/main.c index d6c1416..cd6076f 100644 --- a/src/main.c +++ b/src/main.c @@ -620,7 +620,7 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD } if (ddraw->wine) - SetWindowLong(This->hWnd, GWL_STYLE, (GetWindowLong(This->hWnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~WS_MAXIMIZEBOX); + SetWindowLong(This->hWnd, GWL_STYLE, (GetWindowLong(This->hWnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~(WS_MAXIMIZEBOX | WS_THICKFRAME)); /* center the window with correct dimensions */ int x = (WindowRect.left != -32000) ? WindowRect.left : (This->mode.dmPelsWidth / 2) - (This->render.width / 2); @@ -914,6 +914,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) WindowRect.right = LOWORD(lParam); WindowRect.bottom = HIWORD(lParam); } + /* else if (ddraw->wine) { WindowRect.right = LOWORD(lParam); @@ -921,6 +922,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (WindowRect.right != ddraw->render.width || WindowRect.bottom != ddraw->render.height) ddraw_SetDisplayMode(ddraw, ddraw->width, ddraw->height, ddraw->bpp); } + */ } } return DefWindowProc(hWnd, uMsg, wParam, lParam); /* Carmageddon fix */