Andreas Mohr <[EMAIL PROTECTED]> writes:

> This is rather non-obvious if handling, I'm surprised that the compiler
> doesn't warn about it, or does it?

It did, but I was making from the top level and it got lost amongtsh
the other messages.

> Could you add proper braces there?

Fixed up patch below.

Does the patch look sane otherwise? The thing that caused the warnings
still works as before, but doesn't emit those warning now, but I offer
no other claim to correctness.


Peter


Index: dlls/msvideo/drawdib.c
===================================================================
RCS file: /home/wine/wine/dlls/msvideo/drawdib.c,v
retrieving revision 1.21
diff -u -r1.21 drawdib.c
--- dlls/msvideo/drawdib.c      3 Jun 2004 23:19:51 -0000       1.21
+++ dlls/msvideo/drawdib.c      14 Oct 2004 15:23:17 -0000
@@ -311,7 +311,7 @@
     whdd = MSVIDEO_GetHddPtr(hdd);
     if (!whdd) return FALSE;
  
-    if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME | DDF_UPDATE | 
DDF_DONTDRAW))
+    if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME | DDF_UPDATE | 
DDF_DONTDRAW | DDF_BACKGROUNDPAL))
         FIXME("wFlags == 0x%08lx not handled\n", (DWORD)wFlags);
  
     if (!lpBits)
@@ -362,7 +362,12 @@
         }
     }
     if (!(wFlags & DDF_DONTDRAW) && whdd->hpal)
-        SelectPalette(hdc, whdd->hpal, FALSE);
+    {
+        if ((wFlags & DDF_BACKGROUNDPAL) && ! (wFlags & DDF_SAME_HDC))
+         SelectPalette(hdc, whdd->hpal, TRUE);
+        else
+         SelectPalette(hdc, whdd->hpal, FALSE);
+    }
  
     if (!(StretchBlt(whdd->hdc, xDst, yDst, dxDst, dyDst, whdd->hMemDC, xSrc, ySrc, 
dxSrc, dySrc, SRCCOPY)))
         ret = FALSE;

Reply via email to