Commit c26f59fb authored by Thomas Guillem's avatar Thomas Guillem

core: vout: clip viewpoint zoom to [-1.f, 1.f]

From -100% to 100%, default is still 0%.
parent a892f9aa
......@@ -90,7 +90,7 @@ struct vlc_viewpoint_t {
float pitch; /* pitch in degrees */
float roll; /* roll in degrees */
float fov; /* field of view in degrees */
float zoom; /* zoom factor, default to 0 */
float zoom; /* zoom factor, [-1.f, 1.f] range, default to 0.f */
};
static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
......
......@@ -1948,6 +1948,7 @@ static bool Control( input_thread_t *p_input,
priv->viewpoint.pitch = fmodf( priv->viewpoint.pitch, 360.f );
priv->viewpoint.roll = fmodf( priv->viewpoint.roll, 360.f );
priv->viewpoint.fov = VLC_CLIP( priv->viewpoint.fov, 0.f, 180.f );
priv->viewpoint.zoom = VLC_CLIP( priv->viewpoint.zoom, -1.f, 1.f );
vout_thread_t **pp_vout;
size_t i_vout;
......
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