diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d1f506515..c4e4e691c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -475,27 +475,16 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.standby_cpufreq = 50; #endif + // ci-settings g_settings.ci_standby_reset = configfile.getInt32("ci_standby_reset", 0); - -#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { - sprintf(cfg_key, "ci_clock_%d", i); - g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 6); - } -#else - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { - sprintf(cfg_key, "ci_clock_%d", i); - g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 9); - } -#endif - + g_settings.ci_check_live = configfile.getInt32("ci_check_live", 0); + g_settings.ci_tuner = configfile.getInt32("ci_tuner", -1); + g_settings.ci_rec_zapto = configfile.getInt32("ci_rec_zapto", 0); + g_settings.ci_mode = configfile.getInt32("ci_mode", 0); #if BOXMODEL_VUPLUS g_settings.ci_delay = configfile.getInt32("ci_delay", 256); - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { - sprintf(cfg_key, "ci_rpr_%d", i); - g_settings.ci_rpr[i] = configfile.getInt32(cfg_key, 9); - } #endif + // ci-settings for each slot for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { sprintf(cfg_key, "ci_ignore_messages_%d", i); g_settings.ci_ignore_messages[i] = configfile.getInt32(cfg_key, 0); @@ -503,11 +492,17 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.ci_save_pincode[i] = configfile.getInt32(cfg_key, 0); sprintf(cfg_key, "ci_pincode_%d", i); g_settings.ci_pincode[i] = configfile.getString(cfg_key, ""); + sprintf(cfg_key, "ci_clock_%d", i); +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE + g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 6); +#else + g_settings.ci_clock[i] = configfile.getInt32(cfg_key, 9); +#endif +#if BOXMODEL_VUPLUS + sprintf(cfg_key, "ci_rpr_%d", i); + g_settings.ci_rpr[i] = configfile.getInt32(cfg_key, 9); +#endif } - g_settings.ci_check_live = configfile.getInt32("ci_check_live", 0); - g_settings.ci_tuner = configfile.getInt32("ci_tuner", -1); - g_settings.ci_rec_zapto = configfile.getInt32("ci_rec_zapto", 0); //NI - g_settings.ci_mode = configfile.getInt32("ci_mode", 0); //NI g_settings.make_hd_list = configfile.getInt32("make_hd_list", 0); g_settings.make_webtv_list = configfile.getInt32("make_webtv_list", 1); @@ -1494,19 +1489,16 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "cpufreq", g_settings.cpufreq); configfile.setInt32( "standby_cpufreq", g_settings.standby_cpufreq); + // ci-settings configfile.setInt32("ci_standby_reset", g_settings.ci_standby_reset); - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { - sprintf(cfg_key, "ci_clock_%d", i); - configfile.setInt32(cfg_key, g_settings.ci_clock[i]); - } - + configfile.setInt32("ci_check_live", g_settings.ci_check_live); + configfile.setInt32("ci_tuner", g_settings.ci_tuner); + configfile.setInt32("ci_rec_zapto", g_settings.ci_rec_zapto); + configfile.setInt32("ci_mode", g_settings.ci_mode); #if BOXMODEL_VUPLUS configfile.setInt32("ci_delay", g_settings.ci_delay); - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { - sprintf(cfg_key, "ci_rpr_%d", i); - configfile.setInt32(cfg_key, g_settings.ci_rpr[i]); - } #endif + // ci-settings for each slot for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { sprintf(cfg_key, "ci_ignore_messages_%d", i); configfile.setInt32(cfg_key, g_settings.ci_ignore_messages[i]); @@ -1514,13 +1506,14 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32(cfg_key, g_settings.ci_save_pincode[i]); sprintf(cfg_key, "ci_pincode_%d", i); configfile.setString(cfg_key, g_settings.ci_pincode[i]); + sprintf(cfg_key, "ci_clock_%d", i); + configfile.setInt32(cfg_key, g_settings.ci_clock[i]); +#if BOXMODEL_VUPLUS + sprintf(cfg_key, "ci_rpr_%d", i); + configfile.setInt32(cfg_key, g_settings.ci_rpr[i]); +#endif } - configfile.setInt32("ci_check_live", g_settings.ci_check_live); - configfile.setInt32("ci_tuner", g_settings.ci_tuner); - configfile.setInt32("ci_rec_zapto", g_settings.ci_rec_zapto); //NI - configfile.setInt32("ci_mode", g_settings.ci_mode); //NI - configfile.setInt32( "make_hd_list", g_settings.make_hd_list); configfile.setInt32( "make_webtv_list", g_settings.make_webtv_list); configfile.setInt32( "make_webradio_list", g_settings.make_webradio_list); diff --git a/src/system/settings.h b/src/system/settings.h index 42db89db8..a6f03e5ca 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -287,19 +287,24 @@ struct SNeutrinoSettings int show_empty_favorites; int avsync; int clockrec; + + // ci-settings int ci_standby_reset; - int ci_clock[4]; + int ci_check_live; + int ci_tuner; + int ci_rec_zapto; + int ci_mode; #if BOXMODEL_VUPLUS int ci_delay; - int ci_rpr[4]; #endif + // ci-settings for each slot int ci_ignore_messages[4]; int ci_save_pincode[4]; std::string ci_pincode[4]; - int ci_check_live; - int ci_tuner; - int ci_rec_zapto; //NI - int ci_mode; //NI + int ci_clock[4]; +#if BOXMODEL_VUPLUS + int ci_rpr[4]; +#endif int radiotext_enable; int webradio_xml_auto;