From c0d8c77f90d8e0021bb00b95515772575f81237b Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Mon, 27 May 2024 04:02:48 +0200 Subject: [PATCH] set and restore mode --- src/winapi_hooks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index a00b834..df3fc30 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -835,7 +835,11 @@ BOOL WINAPI fake_WinGStretchBlt( int wSrc, int hSrc) { - return fake_StretchBlt(hdcDest, xDest, yDest, wDest, hDest, hdcSrc, xSrc, ySrc, wSrc, hSrc, SRCCOPY); + int mode = SetStretchBltMode(hdcDest, COLORONCOLOR); + BOOL result = fake_StretchBlt(hdcDest, xDest, yDest, wDest, hDest, hdcSrc, xSrc, ySrc, wSrc, hSrc, SRCCOPY); + SetStretchBltMode(hdcDest, mode); + + return result; } BOOL WINAPI fake_BitBlt(