[vlc-commits] core: keys: add ACTION_ID_VIEWPOINT_ROLL (not bound)
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:38:15 2016 +0100| [4ad8cdba147c61c403f54e7dd1aefe087c145643] | committer: Thomas Guillem
core: keys: add ACTION_ID_VIEWPOINT_ROLL (not bound)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ad8cdba147c61c403f54e7dd1aefe087c145643
---
include/vlc_keys.h | 2 ++
modules/control/hotkeys.c | 13 +++++++++++++
src/config/keys.c | 2 ++
src/libvlc-module.c | 6 ++++++
4 files changed, 23 insertions(+)
diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index 57a9fe4..abebaa8 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -232,6 +232,8 @@ typedef enum vlc_action {
ACTIONID_VIEWPOINT_FOV_OUT,
ACTIONID_VIEWPOINT_ZOOM_IN,
ACTIONID_VIEWPOINT_ZOOM_OUT,
+ ACTIONID_VIEWPOINT_ROLL_CLOCK,
+ ACTIONID_VIEWPOINT_ROLL_ANTICLOCK,
} vlc_action_t;
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index cfa4cdd..40b9672 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -945,6 +945,19 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
false );
break;
+ case ACTIONID_VIEWPOINT_ROLL_CLOCK:
+ if( p_vout )
+ input_UpdateViewpoint( p_input,
+ &(vlc_viewpoint_t) { .roll = -1.f },
+ false );
+ break;
+ case ACTIONID_VIEWPOINT_ROLL_ANTICLOCK:
+ if( p_vout )
+ input_UpdateViewpoint( p_input,
+ &(vlc_viewpoint_t) { .roll = 1.f },
+ false );
+ break;
+
case ACTIONID_TOGGLE_AUTOSCALE:
if( p_vout )
{
diff --git a/src/config/keys.c b/src/config/keys.c
index 507dbf7..859c0d0 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-roll-anticlock", ACTIONID_VIEWPOINT_ROLL_ANTICLOCK, },
+ { "viewpoint-roll-clock", ACTIONID_VIEWPOINT_ROLL_CLOCK, },
{ "viewpoint-zoom-in", ACTIONID_VIEWPOINT_ZOOM_IN, },
{ "viewpoint-zoom-out", ACTIONID_VIEWPOINT_ZOOM_OUT, },
{ "vol-down", ACTIONID_VOL_DOWN, },
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 076a7b6..8c1c436 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1427,6 +1427,8 @@ static const char *const mouse_wheel_texts[] = {
#define VIEWPOINT_FOV_OUT_KEY_TEXT N_("Expand the viewpoint field of view (360°)")
#define VIEWPOINT_ZOOM_IN_KEY_TEXT N_("Increase the viewpoint zoom (360°)")
#define VIEWPOINT_ZOOM_OUT_KEY_TEXT N_("Decrease the viewpoint zoom (360°)")
+#define VIEWPOINT_ROLL_CLOCK_KEY_TEXT N_("Roll the viewpoint clockwise (360°)")
+#define VIEWPOINT_ROLL_ANTICLOCK_KEY_TEXT N_("Roll the viewpoint anti-clockwise (360°)")
#define WALLPAPER_KEY_TEXT N_("Toggle wallpaper mode in video output")
#define WALLPAPER_KEY_LONGTEXT N_( \
@@ -2584,6 +2586,10 @@ vlc_module_begin ()
VIEWPOINT_ZOOM_IN_KEY_TEXT, VIEWPOINT_ZOOM_IN_KEY_TEXT, true )
add_key( "key-viewpoint-zoom-out", KEY_VIEWPOINT_ZOOM_OUT,
VIEWPOINT_ZOOM_OUT_KEY_TEXT, VIEWPOINT_ZOOM_OUT_KEY_TEXT, true )
+ add_key( "key-viewpoint-roll-clock", NULL,
+ VIEWPOINT_ROLL_CLOCK_KEY_TEXT, VIEWPOINT_ROLL_CLOCK_KEY_TEXT, true )
+ add_key( "key-viewpoint-roll-anticlock", NULL,
+ VIEWPOINT_ROLL_ANTICLOCK_KEY_TEXT, VIEWPOINT_ROLL_ANTICLOCK_KEY_TEXT, true )
set_section ( N_("Zoom" ), NULL )
add_key( "key-zoom-quarter", KEY_ZOOM_QUARTER,
More information about the vlc-commits
mailing list