[PATCH v2 0/1] MR10389: comctl32/static: Set HALFTONE StretchBlt mode in STATIC_PaintBitmapfn().
-- v2: comctl32/static: Set HALFTONE StretchBlt mode in STATIC_PaintBitmapfn(). https://gitlab.winehq.org/wine/wine/-/merge_requests/10389
From: Paul Gofman <pgofman@codeweavers.com> --- dlls/comctl32_v6/static.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/comctl32_v6/static.c b/dlls/comctl32_v6/static.c index c243d3f871e..f27fcf03fd4 100644 --- a/dlls/comctl32_v6/static.c +++ b/dlls/comctl32_v6/static.c @@ -859,6 +859,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style HDC hMemDC; HBITMAP hBitmap, oldbitmap; RECT rcClient; + int prev_mode; GetClientRect( hwnd, &rcClient ); FillRect( hdc, &rcClient, hbrush ); @@ -890,6 +891,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style rcClient.bottom = rcClient.top + bm.bmHeight; } + prev_mode = SetStretchBltMode(hdc, HALFTONE); if (extra->image_has_alpha) GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hMemDC, @@ -898,6 +900,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hMemDC, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY); + SetStretchBltMode(hdc, prev_mode); SelectObject(hMemDC, oldbitmap); DeleteDC(hMemDC); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10389
v2: * remove spaces inside the parentheses. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10389#note_133034
This merge request was approved by Zhiyi Zhang. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10389
participants (3)
-
Paul Gofman -
Paul Gofman (@gofman) -
Zhiyi Zhang (@zhiyi)