]> git.sesse.net Git - vlc/commitdiff
Only load globalhotkeys if requested by caller
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 6 May 2009 15:15:27 +0000 (18:15 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 6 May 2009 15:15:27 +0000 (18:15 +0300)
This leaves the choice for bindings to use it or not.

I wish we did the same for hotkeys and inhibit but it would break
backward libvlc API compatibility.

bin/vlc.c
bin/winvlc.c
src/libvlc.c

index 3a15722d77e4f8094a75c27784026f8e1c368721..55f7c5f70fe1a9bf403ab3f3d14a6c4a346d8987 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -151,6 +151,7 @@ int main( int i_argc, const char *ppsz_argv[] )
             libvlc_exception_clear (&ex);
             pthread_sigmask (SIG_UNBLOCK, &set, NULL);
         }
+        libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
         libvlc_add_intf (vlc, NULL, &ex);
         libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
         libvlc_wait (vlc);
index e752d080f21a5355d1ff8055121f138403190a13..a2d66162523fea27ab86f9176bdc5e71bcadc97e 100644 (file)
@@ -147,6 +147,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex);
     if (vlc != NULL)
     {
+        libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
         libvlc_add_intf (vlc, NULL, &ex);
         libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
         libvlc_wait (vlc);
index d40a0a7e1e4bcc5050b293704c429d05f86d4a43..d1aa5f864d29a5a6afbe757825e0e0811045d79a 100644 (file)
@@ -904,8 +904,6 @@ 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" );
-    if( module_exists( "globalhotkeys" ) )
-        libvlc_InternalAddIntf( p_libvlc, "globalhotkeys,none" );
 
 #ifdef HAVE_DBUS
     /* loads dbus control interface if in one-instance mode