changeset 33887:584b9baad6b5

Remove unneeded variable and simplify code.
author ib
date Fri, 12 Aug 2011 09:40:29 +0000
parents 5f1faa91717e
children b6ec17457aae
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Thu Aug 11 18:17:26 2011 +0000
+++ b/mplayer.c	Fri Aug 12 09:40:29 2011 +0000
@@ -2745,8 +2745,6 @@
     int opt_exit = 0; // Flag indicating whether MPlayer should exit without playing anything.
     int i;
 
-    int gui_no_filename = 0;
-
     common_preinit();
 
     // Create the config context and register the options
@@ -2902,14 +2900,10 @@
     if (opt_exit)
         exit_player(EXIT_NONE);
 
-    if (!filename) {
-        if (use_gui)
-            gui_no_filename = 1;
-        else if (!player_idle_mode) {
+    if (!filename && !player_idle_mode && !use_gui) {
             // no file/vcd/dvd -> show HELP:
             mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text);
             exit_player_with_rc(EXIT_NONE, 0);
-        }
     }
 
     /* Display what configure line was used */
@@ -3034,7 +3028,7 @@
     if (use_gui) {
         guiInit();
         gui(GUI_SET_CONTEXT, mpctx);
-        gui(GUI_SET_STATE, (void *)(gui_no_filename ? GUI_STOP : GUI_PLAY));
+        gui(GUI_SET_STATE, (void *)(filename ? GUI_PLAY : GUI_STOP));
     }
 #endif