Alexandre Julliard : gdi32: Return more meaningful data in the null driver GetDeviceCaps implementation.

Dmitry Timoshkov dmitry at baikal.ru
Thu May 18 21:46:23 CDT 2017


Alexandre Julliard <julliard at winehq.org> wrote:

> +    case BITSPIXEL:       return 32;

Shouldn't BITSPIXEL be also fetched from dev->hdc like the values below?

> +    case NUMCOLORS:
> +        bpp = GetDeviceCaps( dev->hdc, BITSPIXEL );
> +        return (bpp > 8) ? -1 : (1 << bpp);
> +    case COLORRES:
> +        /* The observed correspondence between BITSPIXEL and COLORRES is:
> +         * BITSPIXEL: 8  -> COLORRES: 18
> +         * BITSPIXEL: 16 -> COLORRES: 16
> +         * BITSPIXEL: 24 -> COLORRES: 24
> +         * BITSPIXEL: 32 -> COLORRES: 24 */
> +        bpp = GetDeviceCaps( dev->hdc, BITSPIXEL );
> +        return (bpp <= 8) ? 18 : min( 24, bpp );

-- 
Dmitry.



More information about the wine-devel mailing list