mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-04 13:03:14 +00:00
parent
5f09d6c833
commit
3962bcb2a2
1 changed files with 5 additions and 11 deletions
|
@ -623,21 +623,15 @@ namespace cryptonote
|
||||||
continue; // if interrupted because stop called, loop should end ..
|
continue; // if interrupted because stop called, loop should end ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool on_ac_power = m_ignore_battery;
|
||||||
|
if(!m_ignore_battery)
|
||||||
|
{
|
||||||
boost::tribool battery_powered(on_battery_power());
|
boost::tribool battery_powered(on_battery_power());
|
||||||
bool on_ac_power = false;
|
if(!indeterminate( battery_powered ))
|
||||||
if(indeterminate( battery_powered ))
|
|
||||||
{
|
|
||||||
// name could be better, only ignores battery requirement if we failed
|
|
||||||
// to get the status of the system
|
|
||||||
if( m_ignore_battery )
|
|
||||||
{
|
|
||||||
on_ac_power = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
on_ac_power = !battery_powered;
|
on_ac_power = !battery_powered;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_is_background_mining_started )
|
if( m_is_background_mining_started )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue