Automatically insert globalhotkeys when available.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 25 Jan 2009 18:23:53 +0000 (19:23 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 25 Jan 2009 18:23:53 +0000 (19:23 +0100)
src/libvlc.c

index ecfd6f0..e9e43bb 100644 (file)
@@ -898,9 +898,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
      * Always load the hotkeys interface if it exists
      */
     libvlc_InternalAddIntf( p_libvlc, "hotkeys,none" );
-#ifdef WIN32
-    libvlc_InternalAddIntf( p_libvlc, "globalhotkeys,none" );
-#endif
+    if( module_exists( "globalhotkeys" ) )
+        libvlc_InternalAddIntf( p_libvlc, "globalhotkeys,none" );
 
 #ifdef HAVE_DBUS
     /* loads dbus control interface if in one-instance mode