x11ddraw fix
geschrader
geschrader at mediaone.net
Mon Nov 12 09:14:59 CST 2001
Alexandre Julliard wrote:
>
>I think it would be better to create the palette on the gdi_display,
>this way it can be manipulated by other threads too. Could you try if
>this works for you?
>
>Index: dlls/x11drv/dga2.c
>===================================================================
>RCS file: /opt/cvs-commit/wine/dlls/x11drv/dga2.c,v
>retrieving revision 1.5
>diff -u -r1.5 dga2.c
>--- dlls/x11drv/dga2.c 2001/09/11 00:32:33 1.5
>+++ dlls/x11drv/dga2.c 2001/11/07 20:28:34
>@@ -174,8 +174,8 @@
>
> static DWORD PASCAL
X11DRV_XF86DGA2_CreatePalette(LPDDHAL_CREATEPALETTEDATA data)
> {
>- Display *display = thread_display();
>- data->lpDDPalette->u1.dwReserved1 = TSXDGACreateColormap(display,
DefaultScreen(display), dga_dev, AllocAll);
>+ data->lpDDPalette->u1.dwReserved1 =
TSXDGACreateColormap(gdi_display, DefaultScreen(gdi_display),
>+ dga_dev,
AllocAll);
> if (data->lpColorTable)
> X11DRV_DDHAL_SetPalEntries(data->lpDDPalette->u1.dwReserved1, 0, 256,
> data->lpColorTable);
>@@ -199,10 +199,9 @@
>
> static DWORD PASCAL X11DRV_XF86DGA2_SetPalette(LPDDHAL_SETPALETTEDATA
data)
> {
>- Display *display = thread_display();
> if ((data->lpDDSurface == X11DRV_DD_Primary) &&
> data->lpDDPalette && data->lpDDPalette->u1.dwReserved1) {
>- TSXDGAInstallColormap(display, DefaultScreen(display),
data->lpDDPalette->u1.dwReserved1);
>+ TSXDGAInstallColormap(gdi_display, DefaultScreen(gdi_display),
data->lpDDPalette->u1.dwReserved1);
> }
> data->ddRVal = DD_OK;
> return DDHAL_DRIVER_HANDLED;
>
Your reasoning makes sense but with your patch I get the following error:
X Error of failed request: XF86DGADirectNotActivated
Major opcode of failed request: 138 (XFree86-DGA)
Minor opcode of failed request: 26 (XDGACreateColormap)
Serial number of failed request: 3691
Current serial number in output stream: 3951
I'm not sure how to interpret this. Documentation for DGA seems to be
pretty non-existant. Is this complaining that the CreateColormap failed
because DGA wasn't activated or that DGA wasn't activated because
of the colormap failure?
---
Glenn Schrader
More information about the wine-devel
mailing list