Commit 314b9fdd authored by Dave Hawkes's avatar Dave Hawkes Committed by Alexandre Julliard

Fix for GetNearestColor so it returns the true color rather than the

system palette if the device does not support a palette.
parent 7904acf1
......@@ -618,6 +618,9 @@ COLORREF WINAPI GetNearestColor(
DC *dc;
PALETTEOBJ *palObj;
if(!(GetDeviceCaps(hdc, RASTERCAPS) & RC_PALETTE)) {
return color;
}
if ( (dc = DC_GetDCPtr( hdc )) )
{
HPALETTE hpal = (dc->hPalette)? dc->hPalette : GetStockObject( DEFAULT_PALETTE );
......
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