Commit 9726a711 authored by Andrew Riedi's avatar Andrew Riedi Committed by Alexandre Julliard

user32: Make the hotspot ICON_HOTSPOT when loading icons.

Based on patches by Henri Verbeet.
parent 75b9c050
......@@ -1124,8 +1124,17 @@ static HICON CURSORICON_LoadFromFile( LPCWSTR filename,
if ( entry->dwDIBOffset + entry->dwDIBSize > filesize )
goto end;
hotspot.x = entry->xHotspot;
hotspot.y = entry->yHotspot;
/* Set the actual hotspot for cursors and ICON_HOTSPOT for icons. */
if ( fCursor )
{
hotspot.x = entry->xHotspot;
hotspot.y = entry->yHotspot;
}
else
{
hotspot.x = ICON_HOTSPOT;
hotspot.y = ICON_HOTSPOT;
}
hIcon = CURSORICON_CreateIconFromBMI( (BITMAPINFO *)&bits[entry->dwDIBOffset],
hotspot, !fCursor, 0x00030000,
width, height, loadflags );
......
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