changeset 25433:55e3b1a32c65

Make libmenu init and uninit in proper place.
author ulion
date Wed, 19 Dec 2007 08:42:18 +0000
parents 7957b8762195
children 8c4c1abcac50
files mplayer.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Wed Dec 19 08:35:40 2007 +0000
+++ b/mplayer.c	Wed Dec 19 08:42:18 2007 +0000
@@ -668,6 +668,10 @@
     inited_flags&=~INITED_INPUT;
     current_module="uninit_input";
     mp_input_uninit();
+#ifdef HAVE_MENU
+    if (use_menu)
+      menu_uninit();
+#endif
   }
 
   current_module=NULL;
@@ -2616,9 +2620,6 @@
 else if(!noconsolecontrols)
     mp_input_add_event_fd(0, getch2);
 
-inited_flags|=INITED_INPUT;
-current_module = NULL;
-
 #ifdef HAVE_MENU
  if(use_menu) {
    if(menu_cfg && menu_init(mpctx, menu_cfg))
@@ -2639,6 +2640,9 @@
  }
 #endif
   
+inited_flags|=INITED_INPUT;
+current_module = NULL;
+
   /// Catch signals
 #ifndef __MINGW32__
   signal(SIGCHLD,child_sighandler);