]> git.sesse.net Git - vlc/blobdiff - modules/control/lirc.c
Very beginning of hotkey widget + Fix 4.2 compilation issue
[vlc] / modules / control / lirc.c
index 2b71e8df28890889172cfe6838f042696b1276a0..fae7fabc31789d50b947a5a96159051bc78afa32 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * lirc.c : lirc module for vlc
  *****************************************************************************
- * Copyright (C) 2003-2005 VideoLAN
+ * Copyright (C) 2003-2005 the VideoLAN team
  * $Id$
  *
- * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
+ * Author: Sigmund Augdal Helberg <dnumgis@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -81,7 +81,7 @@ static int Open( vlc_object_t *p_this )
     i_fd = lirc_init( "vlc", 1 );
     if( i_fd == -1 )
     {
-        msg_Err( p_intf, "lirc_init failed" );
+        msg_Err( p_intf, "lirc initialisation failed" );
         free( p_intf->p_sys );
         return 1;
     }
@@ -91,7 +91,7 @@ static int Open( vlc_object_t *p_this )
 
     if( lirc_readconfig( NULL, &p_intf->p_sys->config, NULL ) != 0 )
     {
-        msg_Err( p_intf, "lirc_readconfig failed" );
+        msg_Err( p_intf, "failure while reading lirc config" );
         lirc_deinit();
         free( p_intf->p_sys );
         return 1;
@@ -120,7 +120,7 @@ static void Run( intf_thread_t *p_intf )
 {
     char *code, *c;
 
-    while( !p_intf->b_die )
+    while( !intf_ShouldDie( p_intf ) )
     {
         /* Sleep a bit */
         msleep( INTF_IDLE_SLEEP );
@@ -136,19 +136,19 @@ static void Run( intf_thread_t *p_intf )
             continue;
         }
 
-        while( !p_intf->b_die
+        while( !intf_ShouldDie( p_intf )
                 && lirc_code2char( p_intf->p_sys->config, code, &c ) == 0
                 && c != NULL )
         {
             vlc_value_t keyval;
 
-            if( strncmp( "key-", c, 4 )
+            if( strncmp( "key-", c, 4 ) )
             {
-                msg_Err( p_intf, "This doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
+                msg_Err( p_intf, "this doesn't appear to be a valid keycombo lirc sent us. Please look at the doc/lirc/example.lirc file in VLC" );
                 break;
             }
             keyval.i_int = config_GetInt( p_intf, c );
-            var_Set( p_intf->p_vlc, "key-pressed", keyval );
+            var_Set( p_intf->p_libvlc, "key-pressed", keyval );
         }
         free( code );
     }