diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-12 12:39:05 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-12 12:39:05 +0000 |
commit | 20acd250c5c5b787e7a7226759752c5905eef13d (patch) | |
tree | 7e3540cbe6145096853b69b8a985d147483fd348 /Gui | |
parent | 66f4e56389d97b61a4a17325201643ef6bd87e37 (diff) | |
download | mpv-20acd250c5c5b787e7a7226759752c5905eef13d.tar.bz2 mpv-20acd250c5c5b787e7a7226759752c5905eef13d.tar.xz |
Fix the Gui with NEW_CONFIG
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8169 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/cfg.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -156,7 +156,11 @@ int cfg_read( void ) // -- 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 @@ int cfg_write( void ) { 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 @@ int cfg_write( void ) break; } } +#endif } fclose( f ); } |