mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:42:57 +00:00
[KERNEL32] GetSystemPowerStatus(): Set the BATTERY_FLAG_CRITICAL flag if the battery life gets lower than 5 percent.
This commit is contained in:
parent
333eb16f30
commit
afca8367ea
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,9 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
|
||||||
PowerStatus->BatteryLifePercent = 100;
|
PowerStatus->BatteryLifePercent = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PowerStatus->BatteryLifePercent <= 4)
|
||||||
|
PowerStatus->BatteryFlag |= BATTERY_FLAG_CRITICAL;
|
||||||
|
|
||||||
if (PowerStatus->BatteryLifePercent <= 32)
|
if (PowerStatus->BatteryLifePercent <= 32)
|
||||||
PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;
|
PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue