Commit 19abe81c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

access_filter_record: use key-action

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