From 743430953541fbfd9231c4d8f44e71eadc7ba87a Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 4 May 2012 12:32:11 +0000 Subject: [PATCH] [GDI32_APITEST] - Comment out a broken test (works only on 32bpp) - Fix MSVC warning svn path=/trunk/; revision=56495 --- rostests/apitests/gdi32/SetDCPenColor.c | 8 +++++--- rostests/apitests/gdi32/SetPixel.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rostests/apitests/gdi32/SetDCPenColor.c b/rostests/apitests/gdi32/SetDCPenColor.c index 5c2f5c46a1a..f0762243488 100644 --- a/rostests/apitests/gdi32/SetDCPenColor.c +++ b/rostests/apitests/gdi32/SetDCPenColor.c @@ -12,7 +12,7 @@ void Test_SetDCPenColor() { HDC hScreenDC, hDC; - HBITMAP hbmp; + HBITMAP hbmp, hbmpOld; // Test an incorrect DC SetLastError(ERROR_SUCCESS); @@ -49,13 +49,15 @@ void Test_SetDCPenColor() hbmp = CreateBitmap(10, 10, 1, 32, NULL); ok(hbmp != 0, "CreateBitmap failed, skipping tests\n"); if (!hbmp) return; - - SelectObject(hDC, hbmp); + hbmpOld = SelectObject(hDC, hbmp); +#if 0 // this only works on 32 bpp screen resolution + ok(hbmpOld != NULL, "\n"); SelectObject(hDC, GetStockObject(DC_PEN)); SetDCPenColor(hDC, 0x123456); MoveToEx(hDC, 0, 0, NULL); LineTo(hDC, 10, 0); ok(GetPixel(hDC, 5, 0) == 0x123456, "\n"); +#endif // Delete the DC DeleteDC(hDC); diff --git a/rostests/apitests/gdi32/SetPixel.c b/rostests/apitests/gdi32/SetPixel.c index 053c79326ba..bd9af8e7268 100644 --- a/rostests/apitests/gdi32/SetPixel.c +++ b/rostests/apitests/gdi32/SetPixel.c @@ -71,7 +71,7 @@ void Test_SetPixel_PAL() HDC hdc; HPALETTE hpal, hpalOld; PULONG pulBits; - ULONG i; + USHORT i; /* Initialize the BITMAPINFO */ pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);