[vlc-devel] commit: Only load globalhotkeys if requested by caller ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed May 6 17:16:55 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 6 18:15:27 2009 +0300| [0c88710e2ccac34ffb971a3531584d0cbd3d739a] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c88710e2ccac34ffb971a3531584d0cbd3d739a
---
bin/vlc.c | 1 +
bin/winvlc.c | 1 +
src/libvlc.c | 2 --
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 3a15722..55f7c5f 100644
--- 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);
diff --git a/bin/winvlc.c b/bin/winvlc.c
index e752d08..a2d6616 100644
--- a/bin/winvlc.c
+++ b/bin/winvlc.c
@@ -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);
diff --git a/src/libvlc.c b/src/libvlc.c
index d40a0a7..d1aa5f8 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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
More information about the vlc-devel
mailing list