Commit d1bb7f71 authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

Disable passing device context to X11DRV_DIB_BuildColorMap when RGB

colormap is used.
parent 2c419acc
......@@ -1442,9 +1442,9 @@ INT X11DRV_DIB_SetDIBits(
if (descr.infoBpp <= 8)
{
descr.colorMap = X11DRV_DIB_BuildColorMap( descr.dc, coloruse,
bmp->bitmap.bmBitsPixel,
info, &descr.nColorMap );
descr.colorMap = X11DRV_DIB_BuildColorMap(
coloruse == DIB_PAL_COLORS? descr.dc : NULL,
coloruse, bmp->bitmap.bmBitsPixel, info, &descr.nColorMap );
if (!descr.colorMap)
{
return 0;
......@@ -2172,11 +2172,8 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
/* Create Color Map */
if (bm.bmBits && bm.bmBitsPixel <= 8)
{
if(dc)
colorMap = X11DRV_DIB_BuildColorMap( dc, usage, bm.bmBitsPixel,
bmi, &nColorMap );
}
colorMap = X11DRV_DIB_BuildColorMap( usage == DIB_PAL_COLORS? dc : NULL,
usage, bm.bmBitsPixel, bmi, &nColorMap );
/* Allocate Memory for DIB and fill structure */
if (bm.bmBits)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment