x11ddraw fix
geschrader
geschrader at mediaone.net
Mon Nov 5 06:34:00 CST 2001
When X11DRV_XF86DGA2_CreatePalette( ) creates the palette
used by X11DRV_DDHAL_DestroyPalette( ) and
X11DRV_DDHAL_SetPalEntries( ), the display which is used is
returned by thread_display( ). This patch makes these two functions
also use thread_display( ) ( rather than gdi_display ). This bug was
causing a BadColor (i.e. invalid colormap) error in the X server
when X11DRV_DDHAL_SetPalEntries( ) was called, followed by
an application crash.
---
Glenn Schrader
-------------- next part --------------
Index: x11ddraw.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11ddraw.c,v
retrieving revision 1.12
diff -u -r1.12 x11ddraw.c
--- x11ddraw.c 2001/08/27 19:04:18 1.12
+++ x11ddraw.c 2001/11/05 09:44:58
@@ -193,7 +193,7 @@
static DWORD PASCAL X11DRV_DDHAL_DestroyPalette(LPDDHAL_DESTROYPALETTEDATA data)
{
Colormap pal = data->lpDDPalette->u1.dwReserved1;
- if (pal) TSXFreeColormap(gdi_display, pal);
+ if (pal) TSXFreeColormap(thread_display(), pal);
data->ddRVal = DD_OK;
return DDHAL_DRIVER_HANDLED;
}
@@ -415,8 +415,8 @@
c.red = lpEntries[n].peRed << 8;
c.green = lpEntries[n].peGreen << 8;
c.blue = lpEntries[n].peBlue << 8;
- TSXStoreColor(gdi_display, pal, &c);
+ TSXStoreColor(thread_display(), pal, &c);
}
- TSXFlush(gdi_display); /* update display immediately */
+ TSXFlush(thread_display()); /* update display immediately */
}
}
More information about the wine-patches
mailing list