mirror of
https://github.com/videolan/vlc.git
synced 2024-11-28 20:34:12 +08:00
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.
This commit is contained in:
parent
36def77907
commit
0c88710e2c
@ -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,
|
|||||||
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,
|
|||||||
* 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
|
||||||
|
Loading…
Reference in New Issue
Block a user