mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
neutrino: fix hw_caps init; it must be initialized after zapit start
Origin commit data
------------------
Branch: ni/coolstream
Commit: edb0a5937e
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-05-08 (Mon, 08 May 2017)
Origin message was:
------------------
- neutrino: fix hw_caps init; it must be initialized after zapit start
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -456,14 +456,22 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
g_settings.hdd_noise = configfile.getInt32( "hdd_noise", 254);
|
g_settings.hdd_noise = configfile.getInt32( "hdd_noise", 254);
|
||||||
g_settings.hdd_statfs_mode = configfile.getInt32( "hdd_statfs_mode", SNeutrinoSettings::HDD_STATFS_RECORDING);
|
g_settings.hdd_statfs_mode = configfile.getInt32( "hdd_statfs_mode", SNeutrinoSettings::HDD_STATFS_RECORDING);
|
||||||
|
|
||||||
|
/*
|
||||||
|
hw_caps uses CFEManager and CFEManager needs g_settings.
|
||||||
|
So g_settings cannot use hw_caps.
|
||||||
|
|
||||||
|
For this reason we need this workaround.
|
||||||
|
*/
|
||||||
|
bool can_shutdown = (cs_get_revision() > 7);
|
||||||
|
|
||||||
g_settings.shutdown_real = false;
|
g_settings.shutdown_real = false;
|
||||||
if (g_info.hw_caps->can_shutdown)
|
if (can_shutdown) //(g_info.hw_caps->can_shutdown)
|
||||||
g_settings.shutdown_real = configfile.getBool("shutdown_real" , false );
|
g_settings.shutdown_real = configfile.getBool("shutdown_real" , false );
|
||||||
g_settings.shutdown_real_rcdelay = configfile.getBool("shutdown_real_rcdelay", false );
|
g_settings.shutdown_real_rcdelay = configfile.getBool("shutdown_real_rcdelay", false );
|
||||||
g_settings.shutdown_count = configfile.getInt32("shutdown_count", 0);
|
g_settings.shutdown_count = configfile.getInt32("shutdown_count", 0);
|
||||||
|
|
||||||
g_settings.shutdown_min = 0;
|
g_settings.shutdown_min = 0;
|
||||||
if (g_info.hw_caps->can_shutdown)
|
if (can_shutdown) //(g_info.hw_caps->can_shutdown)
|
||||||
g_settings.shutdown_min = configfile.getInt32("shutdown_min", 180);
|
g_settings.shutdown_min = configfile.getInt32("shutdown_min", 180);
|
||||||
g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0);
|
g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0);
|
||||||
|
|
||||||
@@ -2043,8 +2051,6 @@ TIMER_START();
|
|||||||
cs_api_init();
|
cs_api_init();
|
||||||
cs_register_messenger(CSSendMessage);
|
cs_register_messenger(CSSendMessage);
|
||||||
|
|
||||||
g_info.hw_caps = get_hwcaps();
|
|
||||||
|
|
||||||
g_Locale = new CLocaleManager;
|
g_Locale = new CLocaleManager;
|
||||||
|
|
||||||
int loadSettingsErg = loadSetup(NEUTRINO_SETTINGS_FILE);
|
int loadSettingsErg = loadSetup(NEUTRINO_SETTINGS_FILE);
|
||||||
@@ -2130,6 +2136,9 @@ TIMER_START();
|
|||||||
|
|
||||||
CheckFastScan();
|
CheckFastScan();
|
||||||
|
|
||||||
|
// init hw_caps *after* zapit start!
|
||||||
|
g_info.hw_caps = get_hwcaps();
|
||||||
|
|
||||||
//timer start
|
//timer start
|
||||||
timer_wakeup = false;//init
|
timer_wakeup = false;//init
|
||||||
wake_up( timer_wakeup );
|
wake_up( timer_wakeup );
|
||||||
|
Reference in New Issue
Block a user