kernel32: Fix percentage calculation in GetSystemPowerStatus.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ea30b88a99
commit
8a5d8d6cf9
|
@ -63,7 +63,7 @@ BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS ps)
|
|||
|
||||
if (bs.BatteryPresent)
|
||||
{
|
||||
ps->BatteryLifePercent = bs.MaxCapacity ? bs.RemainingCapacity / bs.MaxCapacity : 100;
|
||||
ps->BatteryLifePercent = bs.MaxCapacity ? 100 * bs.RemainingCapacity / bs.MaxCapacity : 100;
|
||||
ps->BatteryLifeTime = bs.EstimatedTime;
|
||||
if (!bs.Charging && (LONG)bs.Rate < 0)
|
||||
ps->BatteryFullLifeTime = 3600 * bs.MaxCapacity / -(LONG)bs.Rate;
|
||||
|
|
Loading…
Reference in New Issue