Commit 3d03caf5 authored by Joseph Tulou's avatar Joseph Tulou Committed by Jean-Baptiste Kempf

SDL: support for autoscaling

Modifications by /me
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 65892a47
...@@ -577,6 +577,28 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -577,6 +577,28 @@ static int Manage( vout_thread_t *p_vout )
p_vout->i_changes |= VOUT_SIZE_CHANGE; p_vout->i_changes |= VOUT_SIZE_CHANGE;
} }
/* autoscale toggle */
if( p_vout->i_changes & VOUT_SCALE_CHANGE )
{
p_vout->i_changes &= ~VOUT_SCALE_CHANGE;
p_vout->b_autoscale = var_GetBool( p_vout, "autoscale" );
p_vout->i_zoom = (int) ZOOM_FP_FACTOR;
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
/* scaling factor (if no-autoscale) */
if( p_vout->i_changes & VOUT_ZOOM_CHANGE )
{
p_vout->i_changes &= ~VOUT_ZOOM_CHANGE;
p_vout->b_autoscale = false;
p_vout->i_zoom = (int)( ZOOM_FP_FACTOR * var_GetFloat( p_vout, "scale" ) );
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
/* Crop or Aspect Ratio Changes */ /* Crop or Aspect Ratio Changes */
if( p_vout->i_changes & VOUT_CROP_CHANGE || if( p_vout->i_changes & VOUT_CROP_CHANGE ||
p_vout->i_changes & VOUT_ASPECT_CHANGE ) p_vout->i_changes & VOUT_ASPECT_CHANGE )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment