]> git.sesse.net Git - vlc/commitdiff
Use action id in lirc. (Untested)
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 28 Dec 2009 23:03:22 +0000 (00:03 +0100)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 28 Dec 2009 23:03:22 +0000 (00:03 +0100)
modules/control/lirc.c

index 2391874a8a01e08c26748fe5ee3da2a811b83afa..b3613e1ae415717c48f7338dd6107b80e1c2210b 100644 (file)
@@ -35,6 +35,7 @@
 #include <vlc_plugin.h>
 #include <vlc_interface.h>
 #include <vlc_osd.h>
+#include <vlc_keys.h>
 
 #ifdef HAVE_POLL
 # include <poll.h>
@@ -179,8 +180,11 @@ static void Process( intf_thread_t *p_intf )
         {
             if( !strncmp( "key-", c, 4 ) )
             {
-                int i_keyval = config_GetInt( p_intf, c );
-                var_SetInteger( p_intf->p_libvlc, "key-pressed", i_keyval );
+                vlc_key_t i_key = vlc_GetActionId( c );
+                if( i_key )
+                    var_SetInteger( p_intf->p_libvlc, "key-action", i_key );
+                else
+                    msg_Err( p_intf, "Unknown hotkey '%s'.", c );
             }
             else if( !strncmp( "menu ", c, 5)  )
             {