From 636d13304661fd968ea08d8871970715cd91176b Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 7 Aug 2019 13:12:20 +0200 Subject: [PATCH] fix GetWindowRect --- inc/hook.h | 2 -- src/mouse.c | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/inc/hook.h b/inc/hook.h index cfc4127..0d46b81 100644 --- a/inc/hook.h +++ b/inc/hook.h @@ -3,8 +3,6 @@ #include -typedef HFONT(__stdcall* CREATEFONTINDIRECTA)(CONST LOGFONT*); - typedef BOOL (WINAPI* GETCURSORPOSPROC)(LPPOINT); typedef BOOL(WINAPI* CLIPCURSORPROC)(const RECT*); typedef int (WINAPI* SHOWCURSORPROC)(BOOL); diff --git a/src/mouse.c b/src/mouse.c index 9b73e7f..b38a021 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -277,7 +277,14 @@ BOOL WINAPI fake_GetWindowRect(HWND hWnd, LPRECT lpRect) } else { - return real_GetWindowRect(hWnd, lpRect) && MapWindowPoints(HWND_DESKTOP, ddraw->hWnd, (LPPOINT)lpRect, 2); + if (real_GetWindowRect(hWnd, lpRect)) + { + MapWindowPoints(HWND_DESKTOP, ddraw->hWnd, (LPPOINT)lpRect, 2); + + return TRUE; + } + + return FALSE; } }