+
+ /***************************
+ * input & codecs settings *
+ ***************************/
+ if( b_inputSettingChanged )
+ {
+ config_PutInt( p_intf, "server-port", [o_input_serverport_fld intValue] );
+ config_PutPsz( p_intf, "http-proxy", [[o_input_httpproxy_fld stringValue] UTF8String] );
+ config_PutInt( p_intf, "ffmpeg-pp-q", [o_input_postproc_fld intValue] );
+
+ SaveIntList( o_input_avi_pop, "avi-index" );
+
+ config_PutInt( p_intf, "rtsp-tcp", [o_input_rtsp_ckb state] );
+
+ #define CaCi( name, int ) config_PutInt( p_intf, name, int * [[o_input_cachelevel_pop selectedItem] tag] )
+ #define CaC( name ) CaCi( name, 1 )
+ msg_Dbg( p_intf, "Adjusting all cache values at: %i", [[o_input_cachelevel_pop selectedItem] tag] );
+ CaC( "udp-caching" );
+ if( module_Exists (p_intf, "dvdread" ) )
+ {
+ CaC( "dvdread-caching" );
+ i = i + config_SaveConfigFile( p_intf, "dvdread" );
+ }
+ if( module_Exists (p_intf, "dvdnav" ) )
+ {
+ CaC( "dvdnav-caching" );
+ i = i + config_SaveConfigFile( p_intf, "dvdnav" );
+ }
+ CaC( "tcp-caching" ); CaC( "vcd-caching" );
+ CaC( "fake-caching" ); CaC( "cdda-caching" ); CaC( "file-caching" );
+ CaC( "screen-caching" );
+ CaCi( "rtsp-caching", 4 ); CaCi( "ftp-caching", 2 );
+ CaCi( "http-caching", 4 );
+ if( module_Exists (p_intf, "access_realrtsp" ) )
+ {
+ CaCi( "realrtsp-caching", 10 );
+ i = i + config_SaveConfigFile( p_intf, "access_realrtsp" );
+ }
+ CaCi( "mms-caching", 19 );
+
+ #define SaveAccessFilter( object, name ) \
+ if( [object state] == NSOnState ) \
+ { \
+ if( b_first ) \
+ { \
+ [o_temp appendString: name]; \
+ b_first = NO; \
+ } \
+ else \
+ [o_temp appendFormat: @":%@", name]; \
+ }
+
+ BOOL b_first = YES;
+ NSMutableString *o_temp = [[NSMutableString alloc] init];
+ SaveAccessFilter( o_input_record_ckb, @"record" );
+ SaveAccessFilter( o_input_dump_ckb, @"dump" );
+ SaveAccessFilter( o_input_bandwidth_ckb, @"bandwidth" );
+ SaveAccessFilter( o_input_timeshift_ckb, @"timeshift" );
+ config_PutPsz( p_intf, "access-filter", [o_temp UTF8String] );
+ [o_temp release];
+
+ i = config_SaveConfigFile( p_intf, "main" );
+ i = i + config_SaveConfigFile( p_intf, "ffmpeg" );
+ i = i + config_SaveConfigFile( p_intf, "access_http" );
+ i = i + config_SaveConfigFile( p_intf, "access_file" );
+ i = i + config_SaveConfigFile( p_intf, "access_tcp" );
+ i = i + config_SaveConfigFile( p_intf, "access_fake" );
+ i = i + config_SaveConfigFile( p_intf, "cdda" );
+ i = i + config_SaveConfigFile( p_intf, "screen" );
+ i = i + config_SaveConfigFile( p_intf, "vcd" );
+ i = i + config_SaveConfigFile( p_intf, "access_ftp" );
+ i = i + config_SaveConfigFile( p_intf, "access_mms" );
+ i = i + config_SaveConfigFile( p_intf, "live555" );
+
+ if( i != 0 )
+ {
+ msg_Err( p_intf, "An error occured while saving the Input settings using SimplePrefs" );
+ i = 0;
+ }
+ b_inputSettingChanged = NO;
+ }
+
+ /**********************
+ * subtitles settings *
+ **********************/
+ if( b_osdSettingChanged )
+ {
+ config_PutInt( p_intf, "osd", [o_osd_osd_ckb state] );
+
+ if( [o_osd_encoding_pop indexOfSelectedItem] >= 0 )
+ config_PutPsz( p_intf, "subsdec-encoding", [[[o_osd_encoding_pop selectedItem] title] UTF8String] );
+
+ config_PutPsz( p_intf, "sub-language", [[o_osd_lang_fld stringValue] UTF8String] );
+ config_PutPsz( p_intf, "freetype-font", [[o_osd_font_fld stringValue] UTF8String] );
+
+ SaveIntList( o_osd_font_color_pop, "freetype-color" );
+ SaveIntList( o_osd_font_size_pop, "freetype-rel-fontsize" );
+ SaveIntList( o_osd_font_effect_pop, "freetype-effect" );
+
+ i = config_SaveConfigFile( p_intf, NULL );
+
+ if( i != 0 )
+ {
+ msg_Err( p_intf, "An error occured while saving the OSD/Subtitle settings using SimplePrefs" );
+ i = 0;
+ }
+ b_osdSettingChanged = NO;
+ }
+
+ /********************
+ * hotkeys settings *
+ ********************/