diff options
Diffstat (limited to 'xorg-server/hw/xwin/winsetsp.c')
-rw-r--r-- | xorg-server/hw/xwin/winsetsp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c index 8f75991ff..fb9105132 100644 --- a/xorg-server/hw/xwin/winsetsp.c +++ b/xorg-server/hw/xwin/winsetsp.c @@ -34,6 +34,11 @@ #endif #include "win.h" +typedef struct mybitmap +{ + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[256]; /* Maximum palette used in case of 8-bit per pixel */ +} mybitmap_t; /* See Porting Layer Definition - p. 55 */ void winSetSpansNativeGDI(DrawablePtr pDrawable, @@ -46,7 +51,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, PixmapPtr pPixmap = NULL; winPrivPixmapPtr pPixmapPriv = NULL; HBITMAP hbmpOrig = NULL; - BITMAPINFO bmi; + mybitmap_t bmi; HRGN hrgn = NULL, combined = NULL; int nbox; BoxPtr pbox; @@ -86,7 +91,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, "failed on pPixmapPriv->hBitmap\n"); while (iSpans--) { - ZeroMemory(&bmi, sizeof(BITMAPINFO)); + ZeroMemory (&bmi, sizeof (mybitmap_t)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = *piWidths; bmi.bmiHeader.biHeight = 1; @@ -107,7 +112,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, 0, 0, *piWidths, 1, pSrcs, - (BITMAPINFO *) & bmi, + (BITMAPINFO*)&bmi, DIB_RGB_COLORS, g_copyROP[pGC->alu]); pSrcs += PixmapBytePad(*piWidths, pDrawable->depth); @@ -129,7 +134,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, combined = NULL; while (iSpans--) { - ZeroMemory(&bmi, sizeof(BITMAPINFO)); + ZeroMemory (&bmi, sizeof (mybitmap_t)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = *piWidths; bmi.bmiHeader.biHeight = 1; |