Alexandre Julliard : user32: Return the icon depth instead of number of colors when loading from a . ico file.
Alexandre Julliard
julliard at winehq.org
Fri May 7 09:41:13 CDT 2010
Module: wine
Branch: master
Commit: 2e96abd0d432ae1374a4e268e3655df9e01822ba
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e96abd0d432ae1374a4e268e3655df9e01822ba
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri May 7 11:34:17 2010 +0200
user32: Return the icon depth instead of number of colors when loading from a .ico file.
---
dlls/user32/cursoricon.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 27d3040..60ff29f 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -677,13 +677,16 @@ static BOOL CURSORICON_GetFileEntry( LPVOID dir, int n,
{
CURSORICONFILEDIR *filedir = dir;
CURSORICONFILEDIRENTRY *entry;
+ BITMAPINFOHEADER *info;
if ( filedir->idCount <= n )
return FALSE;
entry = &filedir->idEntries[n];
+ /* FIXME: check against file size */
+ info = (BITMAPINFOHEADER *)((char *)dir + entry->dwDIBOffset);
*width = entry->bWidth;
*height = entry->bHeight;
- *bits = entry->bColorCount;
+ *bits = info->biBitCount;
return TRUE;
}
More information about the wine-cvs
mailing list