[vlc-commits] input: clip the viewpoint FOV with min and max constants

Adrien Maglo git at videolan.org
Fri Nov 25 10:37:33 CET 2016


vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed Nov 23 20:04:44 2016 +0100| [c18c70f554c70e4c6865ad7a77ade841b409f81b] | committer: Thomas Guillem

input: clip the viewpoint FOV with min and max constants

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c18c70f554c70e4c6865ad7a77ade841b409f81b
---

 src/input/input.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index cfcb92f..aebeea2 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1948,7 +1948,9 @@ static bool Control( input_thread_t *p_input,
             priv->viewpoint.yaw = fmodf( priv->viewpoint.yaw, 360.f );
             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.fov = VLC_CLIP( priv->viewpoint.fov,
+                                            FIELD_OF_VIEW_DEGREES_MIN,
+                                            FIELD_OF_VIEW_DEGREES_MAX );
             priv->viewpoint.zoom = VLC_CLIP( priv->viewpoint.zoom, -1.f, 1.f );
 
             vout_thread_t **pp_vout;



More information about the vlc-commits mailing list