Merge pull request #3255
3962bcb2
Closes #2886: really ignore battery checking (Timothy D. Prime)
This commit is contained in:
commit
ff36fd93fd
|
@ -624,21 +624,15 @@ namespace cryptonote
|
||||||
continue; // if interrupted because stop called, loop should end ..
|
continue; // if interrupted because stop called, loop should end ..
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::tribool battery_powered(on_battery_power());
|
bool on_ac_power = m_ignore_battery;
|
||||||
bool on_ac_power = false;
|
if(!m_ignore_battery)
|
||||||
if(indeterminate( battery_powered ))
|
|
||||||
{
|
{
|
||||||
// name could be better, only ignores battery requirement if we failed
|
boost::tribool battery_powered(on_battery_power());
|
||||||
// to get the status of the system
|
if(!indeterminate( battery_powered ))
|
||||||
if( m_ignore_battery )
|
|
||||||
{
|
{
|
||||||
on_ac_power = true;
|
on_ac_power = !battery_powered;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
on_ac_power = !battery_powered;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( m_is_background_mining_started )
|
if( m_is_background_mining_started )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue