diff gui/interface.c @ 33768:cee9987bc81d

Remove guiExit(). Integrate it into mplayer().
author ib
date Sat, 09 Jul 2011 10:23:47 +0000
parents 515a3b5f291e
children 6e774a02d00c
line wrap: on
line diff
--- a/gui/interface.c	Fri Jul 08 21:57:18 2011 +0000
+++ b/gui/interface.c	Sat Jul 09 10:23:47 2011 +0000
@@ -45,6 +45,7 @@
 #include "libvo/video_out.h"
 #include "libvo/x11_common.h"
 #include "mixer.h"
+#include "mp_core.h"
 #include "mp_msg.h"
 #include "mpcommon.h"
 #include "mplayer.h"
@@ -123,11 +124,11 @@
     switch (i) {
     case -1:
         gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName);
-        guiExit(EXIT_ERROR);
+        mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
 
     case -2:
         gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgError, skinName);
-        guiExit(EXIT_ERROR);
+        mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
     }
 
     // initialize windows
@@ -136,7 +137,7 @@
 
     if (!mainDrawBuffer) {
         gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
-        guiExit(EXIT_ERROR);
+        mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
     }
 
     if (gui_save_pos) {
@@ -491,7 +492,7 @@
 
         if (!video_driver_list && !video_driver_list[0]) {
             gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD);
-            guiExit(EXIT_ERROR);
+            mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
         }
 
         {
@@ -1080,6 +1081,10 @@
 
         break;
     }
+
+    case MPLAYER_EXIT_GUI:
+        exit_player_with_rc((enum exit_reason)fparam, (enum exit_reason)fparam >= EXIT_ERROR);
+        break;
     }
 }
 
@@ -1181,11 +1186,6 @@
     update_set_of_subtitles();
 }
 
-void guiExit(enum exit_reason how)
-{
-    exit_player_with_rc(how, how >= EXIT_ERROR);
-}
-
 // NOTE TO MYSELF: This function is nonsense.
 //                 MPlayer should pass messages to the GUI
 //                 which must decide then which message has