[vlc-devel] [PATCH 18/22] win32touch: use vlc_actions_do
Rémi Denis-Courmont
remi at remlab.net
Thu Aug 3 16:43:24 CEST 2017
Le 3 août 2017 16:10:51 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo at beauzee.fr> a écrit :
>From: Thomas Guillem <thomas at gllm.fr>
>
>---
> modules/video_output/win32/win32touch.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
>diff --git a/modules/video_output/win32/win32touch.c
>b/modules/video_output/win32/win32touch.c
>index 72f041b9d0..ccd103f184 100644
>--- a/modules/video_output/win32/win32touch.c
>+++ b/modules/video_output/win32/win32touch.c
>@@ -74,7 +74,7 @@ LRESULT DecodeGesture( vlc_object_t *p_this,
>win32_gesture_sys_t *p_gesture,
> else
> action_id = ACTIONID_JUMP_FORWARD_SHORT;
> }
>- var_SetInteger( p_this->obj.libvlc, "key-action",
>action_id );
>+ vlc_actions_do( p_this, action_id, true );
> }
> /* Reset the values */
> p_gesture->i_action = GESTURE_ACTION_UNDEFINED;
>@@ -108,9 +108,9 @@ LRESULT DecodeGesture( vlc_object_t *p_this,
>win32_gesture_sys_t *p_gesture,
> int offset = p_gesture->i_lasty - gi.ptsLocation.y;
>
> if( offset > 100)
>- var_SetInteger( p_this->obj.libvlc,
>"key-action", ACTIONID_VOL_UP );
>+ vlc_actions_do( p_this, ACTIONID_VOL_UP, true
>);
> else if( offset < -100)
>- var_SetInteger( p_this->obj.libvlc,
>"key-action", ACTIONID_VOL_DOWN );
>+ vlc_actions_do( p_this, ACTIONID_VOL_DOWN,
>true );
> else
> break;
>
>@@ -124,19 +124,19 @@ LRESULT DecodeGesture( vlc_object_t *p_this,
>win32_gesture_sys_t *p_gesture,
>
> if( p_gesture->i_lasty - p_gesture->i_beginy > 80 )
> {
>- var_SetInteger( p_this->obj.libvlc,
>"key-action", ACTIONID_BRIGHTNESS_DOWN );
>+ vlc_actions_do( p_this,
>ACTIONID_BRIGHTNESS_DOWN, true );
> p_gesture->i_lasty = gi.ptsLocation.y;
> }
> else if ( p_gesture->i_lasty - p_gesture->i_beginy < 80 )
> {
>- var_SetInteger( p_this->obj.libvlc,
>"key-action", ACTIONID_BRIGHTNESS_UP );
>+ vlc_actions_do( p_this,
>ACTIONID_BRIGHTNESS_UP, true );
> p_gesture->i_lasty = gi.ptsLocation.y;
> } */
> }
> break;
> case GID_TWOFINGERTAP:
> p_gesture->i_type = GID_TWOFINGERTAP;
>- var_SetInteger( p_this->obj.libvlc, "key-action",
>ACTIONID_PLAY_PAUSE );
>+ vlc_actions_do( p_this, ACTIONID_PLAY_PAUSE, true );
> bHandled = TRUE;
> break;
> case GID_ZOOM:
>@@ -151,11 +151,11 @@ LRESULT DecodeGesture( vlc_object_t *p_this,
>win32_gesture_sys_t *p_gesture,
> double k = (double)(gi.ullArguments) /
> (double)(p_gesture->i_ullArguments);
> if( k > 1 )
>- var_SetInteger( p_this->obj.libvlc,
>"key-action",
>- ACTIONID_TOGGLE_FULLSCREEN );
>+ vlc_actions_do( p_this,
>+ ACTIONID_TOGGLE_FULLSCREEN,
>true );
> else
>- var_SetInteger( p_this->obj.libvlc,
>"key-action",
>- ACTIONID_LEAVE_FULLSCREEN );
>+ vlc_actions_do( p_this,
>+ ACTIONID_LEAVE_FULLSCREEN,
>true );
> }
> break;
> default:
>--
>2.11.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
Same as 15
--
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170803/6c1860cc/attachment.html>
More information about the vlc-devel
mailing list