[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: GetNearestColor Fix
From: "Dave Hawkes" <daveh-wine () cadlink ! com>
Date: 2002-01-29 20:52:06
[Download RAW message or body]
Fix for GetNearestColor so it returns the true color rather than the system
palette if the device does not support a palette (ie > 256 colors). This not
quite what the Windows SDK docs say, but it's what happens in practice...
Dave Hawkes
["diff.txt" (text/plain)]
Index: objects/palette.c
===================================================================
RCS file: /home/wine/wine/objects/palette.c,v
retrieving revision 1.39
diff -u -r1.39 palette.c
--- objects/palette.c 2002/01/29 02:53:43 1.39
+++ objects/palette.c 2002/01/29 18:56:20
@@ -618,6 +618,9 @@
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 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic