[MPlayer-cvslog] r34665 - in trunk/gui: cfg.c win32/wincfg.c

ib subversion at mplayerhq.hu
Thu Feb 9 14:25:05 CET 2012


Author: ib
Date: Thu Feb  9 14:25:05 2012
New Revision: 34665

Log:
In case of a GUI config error, exit MPlayer with error.

Additionally, add missing newline to error message and
adjust Win32 message level to MSGL_ERR.

Modified:
   trunk/gui/cfg.c
   trunk/gui/win32/wincfg.c

Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c	Thu Feb  9 13:52:09 2012	(r34664)
+++ trunk/gui/cfg.c	Thu Feb  9 14:25:05 2012	(r34665)
@@ -261,8 +261,8 @@ void cfg_read(void)
     m_config_register_options(gui_conf, gui_opts);
 
     if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, cfg, 1) < 0)) {
-        gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_ConfigFileError);
-// mplayer(MPLAYER_EXIT_GUI, 1, 0);
+        gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_ConfigFileError "\n");
+        mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
     }
 
     free(cfg);

Modified: trunk/gui/win32/wincfg.c
==============================================================================
--- trunk/gui/win32/wincfg.c	Thu Feb  9 13:52:09 2012	(r34664)
+++ trunk/gui/win32/wincfg.c	Thu Feb  9 14:25:05 2012	(r34665)
@@ -106,7 +106,7 @@ void cfg_read(void)
     gui_conf = m_config_new();
     m_config_register_options(gui_conf, gui_opts);
     if (m_config_parse_config_file(gui_conf, cfg, 1) < 0)
-        mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_ConfigFileError);
+        mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_ConfigFileError "\n");
     free(cfg);
 }
 


More information about the MPlayer-cvslog mailing list