Alexandre Julliard : gdi32: Return failure when GetPixel is not supported.

Alexandre Julliard julliard at winehq.org
Fri Nov 4 12:17:34 CDT 2011


Module: wine
Branch: master
Commit: 278899d1e82330af0927a347c2469db94ac9f2bc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=278899d1e82330af0927a347c2469db94ac9f2bc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov  4 11:00:57 2011 +0100

gdi32: Return failure when GetPixel is not supported.

---

 dlls/gdi32/driver.c   |    2 +-
 dlls/gdi32/tests/dc.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index e76975a..0986d68 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -402,7 +402,7 @@ static UINT nulldrv_GetOutlineTextMetrics( PHYSDEV dev, UINT size, LPOUTLINETEXT
 
 static COLORREF nulldrv_GetPixel( PHYSDEV dev, INT x, INT y )
 {
-    return 0;
+    return CLR_INVALID;
 }
 
 static INT nulldrv_GetPixelFormat( PHYSDEV dev )
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index 19d417b..26b7c61 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -873,6 +873,9 @@ static void test_printer_dc(void)
     ok( BitBlt( memdc, 10, 10, 20, 20, display_memdc, 0, 0, SRCCOPY ), "BitBlt failed\n" );
     ok( BitBlt( display_memdc, 10, 10, 20, 20, memdc, 0, 0, SRCCOPY ), "BitBlt failed\n" );
 
+    ret = GetPixel( hdc, 0, 0 );
+    ok( ret == CLR_INVALID, "wrong pixel value %x\n", ret );
+
     DeleteDC( memdc );
     DeleteDC( display_memdc );
     DeleteDC( hdc );




More information about the wine-cvs mailing list