[vlc-devel] commit: Use action id in lirc. (Untested) (Antoine Cellerier )

git version control git at videolan.org
Tue Dec 29 00:21:29 CET 2009


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Tue Dec 29 00:03:22 2009 +0100| [b9452821d8d5595a77c645876c32009d6e67f8c4] | committer: Antoine Cellerier 

Use action id in lirc. (Untested)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9452821d8d5595a77c645876c32009d6e67f8c4
---

 modules/control/lirc.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/control/lirc.c b/modules/control/lirc.c
index 2391874..b3613e1 100644
--- a/modules/control/lirc.c
+++ b/modules/control/lirc.c
@@ -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)  )
             {




More information about the vlc-devel mailing list