Added mining on battery setting
This commit is contained in:
parent
5bc89fdc8b
commit
299b180b28
10 changed files with 95 additions and 18 deletions
|
@ -157,3 +157,12 @@ void xmrig::Platform::setThreadPriority(int priority)
|
|||
SetThreadPriority(GetCurrentThread(), prio);
|
||||
}
|
||||
|
||||
|
||||
bool xmrig::Platform::isOnBatteryPower()
|
||||
{
|
||||
SYSTEM_POWER_STATUS st;
|
||||
if (GetSystemPowerStatus(&st)) {
|
||||
return (st.ACLineStatus == 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue