Skip to content

Commit

Permalink
improve ClientToScreen and ScreenToClient hooks - fixes tiberian sun …
Browse files Browse the repository at this point in the history
…save game confirmation dialog
  • Loading branch information
FunkyFr3sh committed Dec 10, 2018
1 parent 12119a4 commit 133950f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ddraw.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_BUILD 3
#define VERSION_REVISION 0
#define VERSION_REVISION 2

#define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION
#define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION)
Expand Down
6 changes: 6 additions & 0 deletions src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,17 @@ BOOL WINAPI fake_GetClientRect(HWND hWnd, LPRECT lpRect)

BOOL WINAPI fake_ClientToScreen(HWND hWnd, LPPOINT lpPoint)
{
if (ddraw && ddraw->hWnd != hWnd)
return ClientToScreen(hWnd, lpPoint) && ScreenToClient(ddraw->hWnd, lpPoint);

return TRUE;
}

BOOL WINAPI fake_ScreenToClient(HWND hWnd, LPPOINT lpPoint)
{
if (ddraw && ddraw->hWnd != hWnd)
return ClientToScreen(ddraw->hWnd, lpPoint) && ScreenToClient(hWnd, lpPoint);

return TRUE;
}

Expand Down

0 comments on commit 133950f

Please sign in to comment.