user32: Return the icon depth instead of number of colors when loading from a .ico file.
This commit is contained in:
parent
5978e4f096
commit
2e96abd0d4
|
@ -677,13 +677,16 @@ static BOOL CURSORICON_GetFileEntry( LPVOID dir, int n,
|
||||||
{
|
{
|
||||||
CURSORICONFILEDIR *filedir = dir;
|
CURSORICONFILEDIR *filedir = dir;
|
||||||
CURSORICONFILEDIRENTRY *entry;
|
CURSORICONFILEDIRENTRY *entry;
|
||||||
|
BITMAPINFOHEADER *info;
|
||||||
|
|
||||||
if ( filedir->idCount <= n )
|
if ( filedir->idCount <= n )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
entry = &filedir->idEntries[n];
|
entry = &filedir->idEntries[n];
|
||||||
|
/* FIXME: check against file size */
|
||||||
|
info = (BITMAPINFOHEADER *)((char *)dir + entry->dwDIBOffset);
|
||||||
*width = entry->bWidth;
|
*width = entry->bWidth;
|
||||||
*height = entry->bHeight;
|
*height = entry->bHeight;
|
||||||
*bits = entry->bColorCount;
|
*bits = info->biBitCount;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue