[GDI] Skip DIB tests with todo_wine on non-TC screens

Felix Nawothnig felix.nawothnig at t-online.de
Sun Jun 26 17:34:39 CDT 2005


To fix this in Wine we'd need a proper DIB engine so...

ChangeLog:
Report a todo and skip DIB tests when they fail at a non-truecolor 
screen depth.
-------------- next part --------------
Index: bitmap.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/tests/bitmap.c,v
retrieving revision 1.6
diff -u -r1.6 bitmap.c
--- bitmap.c	20 Jun 2005 13:13:53 -0000	1.6
+++ bitmap.c	26 Jun 2005 22:31:15 -0000
@@ -160,8 +160,12 @@
 }
 
 #define test_color_todo(got, exp, txt, todo) \
-    if (todo) todo_wine { ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp); } \
-    else ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp)
+    if (!todo && got != exp && screen_depth < 24) { \
+      todo_wine ok(0, #txt " failed at %d-bit screen depth: got 0x%06x expected 0x%06x - skipping DIB tests\n", \
+                   screen_depth, (UINT)got, (UINT)exp); \
+      return; \
+    } else if (todo) todo_wine { ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp); } \
+    else ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp) \
 
 #define test_color(hdc, color, exp, todo_setp, todo_getp) \
 { \
@@ -192,8 +196,10 @@
     HPALETTE hpal, oldpal;
     COLORREF c0, c1;
     int i;
+    int screen_depth;
 
     hdc = GetDC(0);
+    screen_depth = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES);
     memset(pbmi, 0, sizeof(bmibuf));
     pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader);
     pbmi->bmiHeader.biHeight = 16;


More information about the wine-patches mailing list