Huw Davies : gdi32: Use the helper to retrieve the number of colours.
Alexandre Julliard
julliard at winehq.org
Thu Jul 28 13:55:45 CDT 2011
Module: wine
Branch: master
Commit: d61e1ffaabf117aa15daee8ced1c19c49a4cf9aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d61e1ffaabf117aa15daee8ced1c19c49a4cf9aa
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Jul 28 15:34:15 2011 +0100
gdi32: Use the helper to retrieve the number of colours.
---
dlls/gdi32/dib.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 99baf67..5adafcb 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -147,14 +147,12 @@ static BOOL bitmapinfo_from_user_bitmapinfo( BITMAPINFO *dst, const BITMAPINFO *
if (bitmap_type == -1) return FALSE;
- colors = (bpp > 8) ? 0 : 1 << bpp;
-
if (bitmap_type == 1)
{
dst->bmiHeader = info->bmiHeader;
dst->bmiHeader.biSize = sizeof(dst->bmiHeader);
- if (info->bmiHeader.biClrUsed) colors = info->bmiHeader.biClrUsed;
+ colors = get_dib_num_of_colors( dst );
if (info->bmiHeader.biCompression == BI_BITFIELDS)
/* bitfields are always at bmiColors even in larger structures */
@@ -184,6 +182,8 @@ static BOOL bitmapinfo_from_user_bitmapinfo( BITMAPINFO *dst, const BITMAPINFO *
dst->bmiHeader.biClrUsed = 0;
dst->bmiHeader.biClrImportant = 0;
+ colors = get_dib_num_of_colors( dst );
+
if (colors)
{
if (coloruse == DIB_PAL_COLORS)
More information about the wine-cvs
mailing list