mirror of
https://github.com/reactos/wine.git
synced 2025-02-14 01:31:43 +00:00
user32: Move the bitmap header check as far up as possible.
Based on a patchset by Henri Verbeet.
This commit is contained in:
parent
f629dc4eb6
commit
927875390d
@ -701,12 +701,6 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
|
||||
hotspot = *pt;
|
||||
bmi = (BITMAPINFO *)(pt + 1);
|
||||
}
|
||||
size = bitmap_info_size( bmi, DIB_RGB_COLORS );
|
||||
|
||||
if (!width) width = bmi->bmiHeader.biWidth;
|
||||
if (!height) height = bmi->bmiHeader.biHeight/2;
|
||||
DoStretch = (bmi->bmiHeader.biHeight/2 != height) ||
|
||||
(bmi->bmiHeader.biWidth != width);
|
||||
|
||||
/* Check bitmap header */
|
||||
|
||||
@ -718,6 +712,13 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = bitmap_info_size( bmi, DIB_RGB_COLORS );
|
||||
|
||||
if (!width) width = bmi->bmiHeader.biWidth;
|
||||
if (!height) height = bmi->bmiHeader.biHeight/2;
|
||||
DoStretch = (bmi->bmiHeader.biHeight/2 != height) ||
|
||||
(bmi->bmiHeader.biWidth != width);
|
||||
|
||||
if (!screen_dc) screen_dc = CreateDCW( DISPLAYW, NULL, NULL, NULL );
|
||||
if (screen_dc)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user