Skip to content
Snippets Groups Projects
Commit 314b9fdd authored by Dave Hawkes's avatar Dave Hawkes Committed by Alexandre Julliard
Browse files

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

system palette if the device does not support a palette.
parent 7904acf1
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment