Clean up CURSORICON_Load.
This commit is contained in:
parent
4b9f3728e0
commit
8c64ebc963
|
@ -919,21 +919,16 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
|
|||
{
|
||||
HANDLE handle = 0;
|
||||
HICON hIcon = 0;
|
||||
HRSRC hRsrc;
|
||||
HRSRC hRsrc, hGroupRsrc;
|
||||
CURSORICONDIR *dir;
|
||||
CURSORICONDIRENTRY *dirEntry;
|
||||
LPBYTE bits;
|
||||
|
||||
if ( loadflags & LR_LOADFROMFILE ) /* Load from file */
|
||||
{
|
||||
hIcon = CURSORICON_LoadFromFile( name, width, height, colors, fCursor, loadflags );
|
||||
}
|
||||
else /* Load from resource */
|
||||
{
|
||||
HRSRC hGroupRsrc;
|
||||
WORD wResId;
|
||||
DWORD dwBytesInRes;
|
||||
|
||||
if ( loadflags & LR_LOADFROMFILE ) /* Load from file */
|
||||
return CURSORICON_LoadFromFile( name, width, height, colors, fCursor, loadflags );
|
||||
|
||||
if (!hInstance) hInstance = user32_module; /* Load OEM cursor/icon */
|
||||
|
||||
/* Normalize hInstance (must be uniquely represented for icon cache) */
|
||||
|
@ -981,7 +976,6 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
|
|||
|
||||
if ( hIcon && (loadflags & LR_SHARED) )
|
||||
CURSORICON_AddSharedIcon( hInstance, hRsrc, hGroupRsrc, hIcon );
|
||||
}
|
||||
|
||||
return hIcon;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue