# HG changeset patch # User ib # Date 1313142029 0 # Node ID 584b9baad6b5a1bc1e2daffffe03ea06321d6c69 # Parent 5f1faa91717ef5d8e2a6b9dbeef5cb305e769ec8 Remove unneeded variable and simplify code. diff -r 5f1faa91717e -r 584b9baad6b5 mplayer.c --- 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