[MPlayer-dev-eng] fix for broken noconsolecontrols flag

Bart van Deenen info at vandeenensupport.com
Mon May 19 09:13:24 CEST 2008


Hi all

Starting mplayer as slave, with the -noconsolecontrols does not  
prevent keypresses from controlling the player when it has focus (on  
linux, mplayer version 1.0rc2). I had a look in the source, and I  
think I fixed it with a one-line change in mplayer.c. My player works  
fine now, and ignores keypresses as it should with the  
-noconsolecontrols option. I hope I'm right, and that this patch gets  
into the source tree.
Thanks for a wonderful piece of software.


Bart van Deenen
Infologic.nl

patch here
----------------------------------------------------
kubu:~/tarballs$ diff -u MPlayer-1.0rc2/mplayer.c  
MPlayer-1.0rc2-bart/mplayer.c
--- MPlayer-1.0rc2/mplayer.c    2007-10-07 21:49:33.000000000 +0200
+++ MPlayer-1.0rc2-bart/mplayer.c       2008-05-19 08:59:06.000000000 +0200
@@ -2595,7 +2595,7 @@
  // Init input system
  current_module = "init_input";
  mp_input_init(use_gui);
-  mp_input_add_key_fd(-1,0,mplayer_get_key,NULL);

+if(!slave_mode && !noconsolecontrols)  
mp_input_add_key_fd(-1,0,mplayer_get_key,NULL);
  if(slave_mode)
  #ifndef __MINGW32__
     mp_input_add_cmd_fd(0,1,NULL,NULL);




More information about the MPlayer-dev-eng mailing list