[Spice-devel] [win32/vd_agent 1/4] construct WDDMMonitorConfigEscape also with NULL DisplayMode

Frediano Ziglio fziglio at redhat.com
Thu Mar 7 22:29:23 UTC 2019


> 
> Adding possibility to construct WDDMMonitorConfigEscape object
> with NULL parameter of DisplayMode. In this case all the fields
> depending on DisplayMode are set to zero.
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>

Acked-by: Frediano Ziglio <fziglio at redhat.com>

> ---
>  vdagent/display_configuration.cpp | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/vdagent/display_configuration.cpp
> b/vdagent/display_configuration.cpp
> index cdbbe23..bb2fb80 100644
> --- a/vdagent/display_configuration.cpp
> +++ b/vdagent/display_configuration.cpp
> @@ -242,10 +242,10 @@ struct WDDMMonitorConfigEscape {
>      {
>          _ioctl = QXL_ESCAPE_MONITOR_CONFIG;
>          _head.id = _head.surface_id = 0;
> -        _head.x = mode->get_pos_x();
> -        _head.y = mode->get_pos_y();
> -        _head.width = mode->get_width();
> -        _head.height = mode->get_height();
> +        _head.x = mode ? mode->get_pos_x() : 0;
> +        _head.y = mode ? mode->get_pos_y() : 0;
> +        _head.width = mode ? mode->get_width() : 0;
> +        _head.height = mode ? mode->get_height() : 0;
>      }
>      uint32_t    _ioctl;
>      QXLHead     _head;

Frediano


More information about the Spice-devel mailing list