]> git.sesse.net Git - vlc/commitdiff
gestures: use var_Inherit
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 19:27:14 +0000 (21:27 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 19:50:33 +0000 (21:50 +0200)
modules/control/gestures.c

index 40553537acf414e046f013a46dc479748f91274a..fdf7cceb3cb1f34b902db5dc76c8234676ce79d3 100644 (file)
@@ -130,13 +130,13 @@ int Open ( vlc_object_t *p_this )
     p_sys->p_vout = NULL;
     p_sys->b_got_gesture = false;
     p_sys->b_button_pressed = false;
-    p_sys->i_threshold = config_GetInt( p_intf, "gestures-threshold" );
+    p_sys->i_threshold = var_InheritInteger( p_intf, "gestures-threshold" );
 
     // Choose the tight button to use
-    char *psz_button = config_GetPsz( p_intf, "gestures-button" );
-    if( !strcmp( psz_button, "left" ) )
+    char *psz_button = var_InheritString( p_intf, "gestures-button" );
+    if( psz_button && !strcmp( psz_button, "left" ) )
         p_sys->i_button_mask = 1;
-    else if( !strcmp( psz_button, "middle" ) )
+    else if( psz_button && !strcmp( psz_button, "middle" ) )
         p_sys->i_button_mask = 2;
     else // psz_button == "right"
         p_sys->i_button_mask = 4;
@@ -211,7 +211,7 @@ static void RunIntf( intf_thread_t *p_intf )
                 p_input = playlist_CurrentInput( p_playlist );
                 if( p_input )
                 {
-                    i_interval = config_GetInt( p_intf , "short-jump-size" );
+                    i_interval = var_InheritInteger( p_intf , "short-jump-size" );
                     if ( i_interval > 0 )
                     {
                         mtime_t i_time = ( (mtime_t)( -i_interval ) * 1000000L);
@@ -226,7 +226,7 @@ static void RunIntf( intf_thread_t *p_intf )
                 p_input = playlist_CurrentInput( p_playlist );
                 if( p_input )
                 {
-                    i_interval = config_GetInt( p_intf , "short-jump-size" );
+                    i_interval = var_InheritInteger( p_intf , "short-jump-size" );
                     if ( i_interval > 0 )
                     {
                         mtime_t i_time = ( (mtime_t)( i_interval ) * 1000000L);