mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 04:49:45 +00:00
[KERNEL32] GetSystemPowerStatus(): Fix coding style. No code changes!
This commit is contained in:
parent
453e5bc2af
commit
333eb16f30
1 changed files with 13 additions and 7 deletions
|
@ -35,7 +35,6 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
|
|||
0,
|
||||
&BattState,
|
||||
sizeof(SYSTEM_BATTERY_STATE));
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
BaseSetLastNTError(Status);
|
||||
|
@ -62,17 +61,24 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
|
|||
PowerStatus->BatteryLifePercent = 100;
|
||||
}
|
||||
|
||||
if (PowerStatus->BatteryLifePercent <= 32) PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;
|
||||
if (PowerStatus->BatteryLifePercent >= 67) PowerStatus->BatteryFlag |= BATTERY_FLAG_HIGH;
|
||||
if (PowerStatus->BatteryLifePercent <= 32)
|
||||
PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;
|
||||
|
||||
if (PowerStatus->BatteryLifePercent >= 67)
|
||||
PowerStatus->BatteryFlag |= BATTERY_FLAG_HIGH;
|
||||
}
|
||||
|
||||
if (!BattState.BatteryPresent) PowerStatus->BatteryFlag |= BATTERY_FLAG_NO_BATTERY;
|
||||
if (!BattState.BatteryPresent)
|
||||
PowerStatus->BatteryFlag |= BATTERY_FLAG_NO_BATTERY;
|
||||
|
||||
if (BattState.Charging) PowerStatus->BatteryFlag |= BATTERY_FLAG_CHARGING;
|
||||
if (BattState.Charging)
|
||||
PowerStatus->BatteryFlag |= BATTERY_FLAG_CHARGING;
|
||||
|
||||
if (!(BattState.AcOnLine) && (BattState.BatteryPresent)) PowerStatus->ACLineStatus = AC_LINE_OFFLINE;
|
||||
if (!(BattState.AcOnLine) && (BattState.BatteryPresent))
|
||||
PowerStatus->ACLineStatus = AC_LINE_OFFLINE;
|
||||
|
||||
if (BattState.EstimatedTime) PowerStatus->BatteryLifeTime = BattState.EstimatedTime;
|
||||
if (BattState.EstimatedTime)
|
||||
PowerStatus->BatteryLifeTime = BattState.EstimatedTime;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue