[vlc-commits] core: keys: add ACTIONID_VIEWPOINT_ZOOM_*

Thomas Guillem git at videolan.org
Thu Nov 17 09:48:27 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 16 13:14:35 2016 +0100| [70ad5ae84ec6194edde0700650c52d211018e9f5] | committer: Thomas Guillem

core: keys: add ACTIONID_VIEWPOINT_ZOOM_*

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

 include/vlc_keys.h        |  2 ++
 modules/control/hotkeys.c | 13 +++++++++++++
 src/config/keys.c         |  2 ++
 3 files changed, 17 insertions(+)

diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index 1bf2a72..57a9fe4 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -230,6 +230,8 @@ typedef enum vlc_action {
     /* Viewpoint */
     ACTIONID_VIEWPOINT_FOV_IN,
     ACTIONID_VIEWPOINT_FOV_OUT,
+    ACTIONID_VIEWPOINT_ZOOM_IN,
+    ACTIONID_VIEWPOINT_ZOOM_OUT,
 
 } vlc_action_t;
 
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 0ad8b42..cfa4cdd 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -932,6 +932,19 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
                                        false );
             break;
 
+        case ACTIONID_VIEWPOINT_ZOOM_IN:
+            if( p_vout )
+                input_UpdateViewpoint( p_input,
+                                       &(vlc_viewpoint_t) { .zoom = 0.01f },
+                                       false );
+            break;
+        case ACTIONID_VIEWPOINT_ZOOM_OUT:
+            if( p_vout )
+                input_UpdateViewpoint( p_input,
+                                       &(vlc_viewpoint_t) { .zoom = -0.01f },
+                                       false );
+            break;
+
          case ACTIONID_TOGGLE_AUTOSCALE:
             if( p_vout )
             {
diff --git a/src/config/keys.c b/src/config/keys.c
index c89983e..507dbf7 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -370,6 +370,8 @@ static const struct action actions[] =
     { "unzoom", ACTIONID_UNZOOM, },
     { "viewpoint-fov-in", ACTIONID_VIEWPOINT_FOV_IN, },
     { "viewpoint-fov-out", ACTIONID_VIEWPOINT_FOV_OUT, },
+    { "viewpoint-zoom-in", ACTIONID_VIEWPOINT_ZOOM_IN, },
+    { "viewpoint-zoom-out", ACTIONID_VIEWPOINT_ZOOM_OUT, },
     { "vol-down", ACTIONID_VOL_DOWN, },
     { "vol-mute", ACTIONID_VOL_MUTE, },
     { "vol-up", ACTIONID_VOL_UP, },



More information about the vlc-commits mailing list