- Keep track of the PDEV which we create a compatible bitmap for.
 - Allow attaching a DDB to a DC if they are from the same PDEV
Fixes various problems after mode switching, including the infamous "Where is desk.cpl palette bitmap"

svn path=/trunk/; revision=64955
This commit is contained in:
Jérôme Gardou 2014-10-24 11:35:07 +00:00
parent 97fcf61354
commit 6990f9e443
2 changed files with 6 additions and 0 deletions

View file

@ -249,6 +249,7 @@ IntCreateCompatibleBitmap(
/* Set flags */
psurf->flags = API_BITMAP;
psurf->hdc = NULL; // FIXME:
psurf->SurfObj.hdev = (HDEV)Dc->ppdev;
SURFACE_ShareUnlockSurface(psurf);
}
else
@ -277,6 +278,7 @@ IntCreateCompatibleBitmap(
/* Set flags */
psurfBmp->flags = API_BITMAP;
psurfBmp->hdc = NULL; // FIXME:
psurf->SurfObj.hdev = (HDEV)Dc->ppdev;
SURFACE_ShareUnlockSurface(psurfBmp);
}
else if (Count == sizeof(DIBSECTION))

View file

@ -330,6 +330,10 @@ DC_bIsBitmapCompatible(PDC pdc, PSURFACE psurf)
/* DIB sections are always compatible */
if (psurf->hSecure != NULL) return TRUE;
/* See if this is the same PDEV */
if (psurf->SurfObj.hdev == (HDEV)pdc->ppdev)
return TRUE;
/* Get the bit depth of the bitmap */
cBitsPixel = gajBitsPerFormat[psurf->SurfObj.iBitmapFormat];