[Mplayer-cvslog] CVS: main/Gui cfg.c,1.19,1.20
Alban Bedel CVS
albeu at mplayerhq.hu
Tue Nov 12 13:39:08 CET 2002
Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv28593/Gui
Modified Files:
cfg.c
Log Message:
Fix the Gui with NEW_CONFIG
Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cfg.c 2 Nov 2002 16:09:03 -0000 1.19
+++ cfg.c 12 Nov 2002 12:39:05 -0000 1.20
@@ -156,7 +156,11 @@
// -- read configuration
mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[cfg] read config file: %s\n",cfg );
- gui_conf=m_config_new( play_tree_new() );
+ gui_conf=m_config_new(
+#ifndef NEW_CONFIG
+ play_tree_new()
+#endif
+ );
m_config_register_options( gui_conf,gui_opts );
if ( m_config_parse_config_file( gui_conf,cfg ) < 0 )
{
@@ -221,6 +225,14 @@
{
for ( i=0;gui_opts[i].name;i++ )
{
+#ifdef NEW_CONFIG
+ char* v = m_option_print(&gui_opts[i],gui_opts[i].p);
+ if(v) {
+ fprintf( f,"%s = \"%s\"\n",gui_opts[i].name, v);
+ free(v);
+ } else if((int)v == -1)
+ mp_msg(MSGT_GPLAYER,MSGL_WARN,"Unable to save the %s option\n");
+#else
switch ( gui_opts[i].type )
{
case CONF_TYPE_INT:
@@ -239,6 +251,7 @@
break;
}
}
+#endif
}
fclose( f );
}
More information about the MPlayer-cvslog
mailing list