[KERNEL32] GetSystemPowerStatus(): Set the BATTERY_FLAG_CRITICAL flag if the battery life gets lower than 5 percent.

This commit is contained in:
Eric Kohl 2019-04-19 22:30:46 +02:00
parent 333eb16f30
commit afca8367ea

View file

@ -61,6 +61,9 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
PowerStatus->BatteryLifePercent = 100;
}
if (PowerStatus->BatteryLifePercent <= 4)
PowerStatus->BatteryFlag |= BATTERY_FLAG_CRITICAL;
if (PowerStatus->BatteryLifePercent <= 32)
PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;