With >256 colours, there is no need to realize a palette, so skip it

and return that no palette entries had to change.
This commit is contained in:
Jason Edmeades 2003-06-04 20:19:33 +00:00 committed by Alexandre Julliard
parent bc9de0500e
commit b383dbf6fc
1 changed files with 2 additions and 0 deletions

View File

@ -1221,6 +1221,8 @@ UINT X11DRV_RealizePalette( X11DRV_PDEVICE *physDev, HPALETTE hpal, BOOL primary
UINT ret;
PALETTEOBJ *palPtr;
if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL) return 0;
if (!(palPtr = GDI_GetObjPtr( hpal, PALETTE_MAGIC ))) return 0;
ret = X11DRV_PALETTE_SetMapping( palPtr, 0, palPtr->logpalette.palNumEntries, !primary );
GDI_ReleaseObj( hpal );