Commit 7deda051 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Create a sanitized BITMAPINFO in CreateDIBSection and pass that to the driver.

parent e21eebb2
......@@ -4470,16 +4470,12 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, const BITMAPINFO
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X_PHYSBITMAP *physBitmap;
DIBSECTION dib;
WORD bpp, compr;
LONG w, h;
#ifdef HAVE_LIBXXSHM
Bool pixmaps;
#endif
if (DIB_GetBitmapInfo( &bmi->bmiHeader, &w, &h, &bpp, &compr ) == -1) return 0;
if (!(physBitmap = X11DRV_init_phys_bitmap( hbitmap ))) return 0;
if (h < 0) physBitmap->topdown = TRUE;
physBitmap->topdown = bmi->bmiHeader.biHeight < 0;
physBitmap->status = DIB_Status_None;
GetObjectW( hbitmap, sizeof(dib), &dib );
......
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