Commit 2e96abd0 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Return the icon depth instead of number of colors when loading from a .ico file.

parent 5978e4f0
......@@ -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;
}
......
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