WGL: WGL_WINE_pixel_format_passthrough [attempt 2]

Alexandre Julliard julliard at winehq.org
Wed Apr 23 04:20:25 CDT 2008


"Roderick Colenbrander" <thunderbird2k at gmx.net> writes:

> +BOOL X11DRV_wglSetPixelFormatWINE(X11DRV_PDEVICE *physDev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
> +{
> +    TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
> +
> +    /* When the requested pixel format differs from the physDev its pixel format AND
> +     * the physDev has a pixel format set, clear current_pf, so that SetPixelFormat
> +     * will set the pixel format again. */
> +    if((physDev->current_pf != 0) && (physDev->current_pf != iPixelFormat)) {
> +        TRACE("Changing iPixelFormat from %d to %d\n", physDev->current_pf, iPixelFormat);
> +        physDev->current_pf = 0;
> +    }

You shouldn't set the format to 0 first, this will break if changing to
the new format fails for some reason.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list