Commit 870d1134 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Win32: make volume touch less sensitive

(cherry picked from commit 895f573f96fb4c2b439fdf45fc6eb63f1ec9a792)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d4fc19a5
......@@ -48,7 +48,7 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
/* Set the win32_gesture_sys_t values */
p_gesture->i_beginx = gi.ptsLocation.x;
p_gesture->i_beginy = gi.ptsLocation.y;
p_gesture->i_lasty = -1;
p_gesture->i_lasty = p_gesture->i_beginy;
p_gesture->b_2fingers = false;
break;
case GID_END:
......@@ -101,11 +101,16 @@ LRESULT DecodeGesture( vlc_object_t *p_this, win32_gesture_sys_t *p_gesture,
if( p_gesture->i_action == GESTURE_ACTION_VOLUME )
{
int offset = p_gesture->i_beginy - gi.ptsLocation.y;
if( offset > 0 )
int offset = p_gesture->i_lasty - gi.ptsLocation.y;
if( offset > 100)
var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_VOL_UP );
else
else if( offset < -100)
var_SetInteger( p_this->p_libvlc, "key-action", ACTIONID_VOL_DOWN );
else
break;
p_gesture->i_lasty = gi.ptsLocation.y;
}
else if ( p_gesture->i_action == GESTURE_ACTION_BRIGHTNESS )
{
......
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