gdi32: Copy gamma ramp validation from winex11 to make it driver independent (try 2)

Alexandre Julliard julliard at winehq.org
Thu Mar 28 13:32:08 CDT 2013


André Hentschel <nerv at dawncrow.de> writes:

> +    /* the bias could be because the app wanted something like a "red shift"
> +    * like when you're hit in Quake, but XVidMode doesn't support it,
> +    * so we have to reject a significant bias */

Clearly gdi32 doesn't care about XVidMode.

> @@ -1325,6 +1405,18 @@ BOOL WINAPI SetDeviceGammaRamp(HDC hDC, LPVOID ptr)
>          if (GetObjectType( hDC ) != OBJ_MEMDC)
>          {
>              PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetDeviceGammaRamp );
> +            struct gamma_ramp
> +            {
> +                WORD red[256];
> +                WORD green[256];
> +                WORD blue[256];
> +            } *ramp = ptr;
> +
> +            if (!check_gamma_ramp(ramp->red) ||
> +                !check_gamma_ramp(ramp->green) ||
> +                !check_gamma_ramp(ramp->blue))
> +                return FALSE;

This can't work.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list