[ros-dev] [ros-diffs] [spetreolle] 41204: ChangeDisplaySettingsA and ChangeDisplaySettingsW should reset dmDriverExtra to 0.

James Tabor jimtabor.rosdev at gmail.com
Sat May 30 19:33:01 CEST 2009


Yes it is,,,,, I think to be more correct! The check is done prior to
calling ChangeDisplaySettingsEx not after....


On Sat, May 30, 2009 at 7:37 AM, Ged <gedmurphy at gmail.com> wrote:
> This seems very strange

>   LPDEVMODEA lpDevMode,
>   DWORD dwflags)
>  {
> -  return ChangeDisplaySettingsExA ( NULL, lpDevMode, NULL, dwflags, 0 );
> +  LONG Status = ChangeDisplaySettingsExA ( NULL, lpDevMode, NULL, dwflags, 0 );
> +  if(lpDevMode)
> +    lpDevMode->dmDriverExtra = 0;
> +  return Status;
>  }
>   LPDEVMODEW lpDevMode,
>   DWORD dwflags)
>  {
> -  return ChangeDisplaySettingsExW ( NULL, lpDevMode, NULL, dwflags, 0 );
> -}
> +  LONG Status = ChangeDisplaySettingsExW ( NULL, lpDevMode, NULL, dwflags, 0 );
> +  if(lpDevMode)
> +    lpDevMode->dmDriverExtra = 0;
> +  return Status;
> +}


More information about the Ros-dev mailing list