Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375 Signed-off-by: Paul Gofman gofmanp@gmail.com --- dlls/user32/cursoricon.c | 4 ++++ dlls/user32/tests/cursoricon.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 539fc7ca54..3214746664 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -2976,6 +2976,8 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, }
orig_bm = SelectObject(screen_mem_dc, hbitmap); + if (info->bmiHeader.biBitCount > 1) + SetStretchBltMode(screen_mem_dc, HALFTONE); StretchDIBits(screen_mem_dc, 0, 0, new_width, new_height, 0, 0, width, height, bits, fix_info, DIB_RGB_COLORS, SRCCOPY); SelectObject(screen_mem_dc, orig_bm);
@@ -3217,6 +3219,8 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx, void * bits;
dc = CreateCompatibleDC(NULL); + if (ds.dsBm.bmBitsPixel > 1) + SetStretchBltMode(dc, HALFTONE);
bi->bmiHeader.biWidth = ds.dsBm.bmWidth; bi->bmiHeader.biHeight = ds.dsBm.bmHeight; diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 56621a661b..8ce1eb163e 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -2918,9 +2918,9 @@ static void test_Image_StretchMode(void) sizeof(colors_bits_1), FALSE}, {4, 4, 2, 2, 8, test_bits_8, expected_bits_8, sizeof(test_bits_8), sizeof(expected_bits_8), colors_bits_8, - sizeof(colors_bits_8), TRUE}, + sizeof(colors_bits_8), FALSE}, {4, 4, 2, 2, 16, (const unsigned char *)test_bits_16, (const unsigned char *)expected_bits_16, - sizeof(test_bits_16), sizeof(expected_bits_16), NULL, 0, TRUE}, + sizeof(test_bits_16), sizeof(expected_bits_16), NULL, 0, FALSE}, }; static const char filename[] = "test.bmp"; BITMAPINFO *bmi, *bmi_output;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47158
Your paranoid android.
=== debian9 (32 bit report) ===
user32: menu.c:2354: Test failed: test 27 menu: Timeout
=== debian9 (32 bit Chinese:China report) ===
user32: msg.c:8713: Test failed: WaitForSingleObject failed 102 msg.c:8719: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8719: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8719: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000