[7/10] user: Move the bitmap header size check to before the point
were we use it.
H. Verbeet
hverbeet at gmail.com
Sat Aug 5 16:40:08 CDT 2006
It doesn't seem very usefull to use the header before checking it.
-------------- next part --------------
diff --git a/dlls/user/cursoricon.c b/dlls/user/cursoricon.c
index 5bfbc80..4b498da 100644
--- a/dlls/user/cursoricon.c
+++ b/dlls/user/cursoricon.c
@@ -1033,13 +1033,6 @@ static BOOL load_cursor_frame( LPBYTE bi
bmi = (BITMAPINFO *)bits;
- 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 */
if ( (bmi->bmiHeader.biSize != sizeof(BITMAPCOREHEADER)) &&
@@ -1050,6 +1043,13 @@ static BOOL load_cursor_frame( LPBYTE bi
return FALSE;
}
+ 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)
{
More information about the wine-patches
mailing list