Skip to content

Commit

Permalink
tweak BeginPaint hook
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Dec 30, 2024
1 parent 743df36 commit 68d6ec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/winapi_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,10 @@ HDC WINAPI fake_BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint)
{
HDC result = real_BeginPaint(hWnd, lpPaint);

if (result)
RECT size = { 0, 0, g_ddraw.width, g_ddraw.height };
real_GetClientRect(hWnd, &size);

if (result && (g_ddraw.width != size.right || g_ddraw.height != size.bottom))
{
lpPaint->rcPaint.left = 0;
lpPaint->rcPaint.top = 0;
Expand Down

0 comments on commit 68d6ec1

Please sign in to comment.