Commit 0c88710e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Only load globalhotkeys if requested by caller

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.
parent 36def779
...@@ -151,6 +151,7 @@ int main( int i_argc, const char *ppsz_argv[] ) ...@@ -151,6 +151,7 @@ int main( int i_argc, const char *ppsz_argv[] )
libvlc_exception_clear (&ex); libvlc_exception_clear (&ex);
pthread_sigmask (SIG_UNBLOCK, &set, NULL); pthread_sigmask (SIG_UNBLOCK, &set, NULL);
} }
libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
libvlc_add_intf (vlc, NULL, &ex); libvlc_add_intf (vlc, NULL, &ex);
libvlc_playlist_play (vlc, -1, 0, NULL, &dummy); libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
libvlc_wait (vlc); libvlc_wait (vlc);
......
...@@ -147,6 +147,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -147,6 +147,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex); vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex);
if (vlc != NULL) if (vlc != NULL)
{ {
libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
libvlc_add_intf (vlc, NULL, &ex); libvlc_add_intf (vlc, NULL, &ex);
libvlc_playlist_play (vlc, -1, 0, NULL, &dummy); libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
libvlc_wait (vlc); libvlc_wait (vlc);
......
...@@ -904,8 +904,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -904,8 +904,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
* Always load the hotkeys interface if it exists * Always load the hotkeys interface if it exists
*/ */
libvlc_InternalAddIntf( p_libvlc, "hotkeys,none" ); libvlc_InternalAddIntf( p_libvlc, "hotkeys,none" );
if( module_exists( "globalhotkeys" ) )
libvlc_InternalAddIntf( p_libvlc, "globalhotkeys,none" );
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
/* loads dbus control interface if in one-instance mode /* loads dbus control interface if in one-instance mode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment