]> git.sesse.net Git - vlc/commitdiff
access_filter_record: use key-action
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 26 Mar 2008 20:50:54 +0000 (22:50 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 27 Mar 2008 18:46:22 +0000 (20:46 +0200)
modules/access_filter/record.c

index 7b9cec1154f675e155d5774fc451c85b8c101b8b..9b214b43a4456a202167d2317b4d43a96de57664 100644 (file)
@@ -160,7 +160,7 @@ static int Open( vlc_object_t *p_this )
     msg_Dbg( p_access, "Record access filter path %s", psz );
 
     /* catch all key event */
-    var_AddCallback( p_access->p_libvlc, "key-pressed", EventKey, p_access );
+    var_AddCallback( p_access->p_libvlc, "key-action", EventKey, p_access );
 
     return VLC_SUCCESS;
 }
@@ -173,7 +173,7 @@ static void Close( vlc_object_t *p_this )
     access_t     *p_access = (access_t*)p_this;
     access_sys_t *p_sys = p_access->p_sys;
 
-    var_DelCallback( p_access->p_libvlc, "key-pressed", EventKey, p_access );
+    var_DelCallback( p_access->p_libvlc, "key-action", EventKey, p_access );
 
     if( p_sys->f )
     {
@@ -279,18 +279,10 @@ static int EventKey( vlc_object_t *p_this, char const *psz_var,
     access_t     *p_access = p_data;
     access_sys_t *p_sys = p_access->p_sys;
 
-    struct hotkey *p_hotkeys = p_access->p_libvlc->p_hotkeys;
-    int i_action = -1, i;
+    (void)psz_var;
+    (void)oldval;
 
-    for( i = 0; p_hotkeys[i].psz_action != NULL; i++ )
-    {
-        if( p_hotkeys[i].i_key == newval.i_int )
-        {
-            i_action = p_hotkeys[i].i_action;
-        }
-    }
-
-    if( i_action == ACTIONID_RECORD )
+    if( newval.i_int == ACTIONID_RECORD )
     {
         if( p_sys->b_dump )
             p_sys->b_dump = VLC_FALSE;