mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[WIN32K]
- 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:
parent
97fcf61354
commit
6990f9e443
2 changed files with 6 additions and 0 deletions
|
@ -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))
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue