[PATCH] DrawDibDraw flag handling
Peter Riocreux
par+wine_patches at silistix.com
Mon Oct 18 06:32:20 CDT 2004
Went through this on wine-devel. I prefer this form of the patch
rather than the shorter form where the if condition is used as the
third argument to the function call as I think that there will be
further conditions to consider.
Changelog:
Make DrawDibDraw honour the DDF_BACKGROUNDPAL flag.
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 18 Oct 2004 11:27:22 -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;
More information about the wine-patches
mailing list