Skip to content
Snippets Groups Projects
Commit b001ee46 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

display: rectify zoom change condition

This actually calls the zoom change control only when the effective
value of the zoom changes. Previous the control would be invoked even
with autoscale enabled, even though that effectively overrode the zoom.
parent 149f6886
No related branches found
No related tags found
1 merge request!1987display: rectify zoom change condition
Pipeline #225229 passed with stage
in 22 minutes and 53 seconds
......@@ -543,12 +543,13 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
{
vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
if (!osys->cfg.display.autoscale
&& osys->cfg.display.zoom.num == num && osys->cfg.display.zoom.den == den)
return; /* nothing to do */
osys->cfg.display.zoom.num = num;
osys->cfg.display.zoom.den = den;
if (osys->cfg.display.autoscale)
return; /* zoom has no effects */
if (osys->cfg.display.zoom.num * den == num * osys->cfg.display.zoom.den)
return; /* zoom has not changed */
if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_ZOOM))
vout_display_Reset(vd);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment