From bbd76a5d9e348f9743d842c765da76865f8823bb Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 17 Nov 2018 08:33:36 +0100 Subject: [PATCH] fix GameHandlesClose --- ddraw.rc | 2 +- src/main.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ddraw.rc b/ddraw.rc index 4b13fa3..fe82788 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 5 +#define VERSION_REVISION 6 #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 e5c9dcf..9bdd0ab 100644 --- a/src/main.c +++ b/src/main.c @@ -977,8 +977,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ToggleFullscreen(); return 0; } - - return DefWindowProc(hWnd, uMsg, wParam, lParam); + + if (!GameHandlesClose) + return DefWindowProc(hWnd, uMsg, wParam, lParam); + + break; case WM_ACTIVATE: if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE)