[PATCH 0/4] GetSystemPowerStatus tests and Linux implementation

Alex Henrie alexhenrie24 at gmail.com
Sun Sep 22 16:12:08 CDT 2019


This patch series is intended to replace Derek Lesho's patch because I
don't think that it's right to treat "no battery information" the same
as "no battery".

The latest Windows SDK calls the fourth member of SYSTEM_POWER_STATUS
SystemStatusFlag instead of Reserved1 and also defines a bunch of
constants for setting flags in SYSTEM_POWER_STATUS.

I ran down my laptop battery to verify that the thresholds for setting
the high, low, and critical flags are correct.

-Alex

Alex Henrie (4):
  include: Rename Reserved1 to SystemStatusFlag in SYSTEM_POWER_STATUS
  include: Add constants needed for SYSTEM_POWER_STATUS
  kernel32/tests: Add tests for GetSystemPowerStatus
  kernel32: Implement GetSystemPowerStatus on Linux

 dlls/kernel32/powermgnt.c       | 72 ++++++++++++++++++++++++++++-----
 dlls/kernel32/tests/Makefile.in |  1 +
 dlls/kernel32/tests/generated.c | 12 +++---
 dlls/kernel32/tests/power.c     | 65 +++++++++++++++++++++++++++++
 include/winbase.h               | 20 ++++++++-
 5 files changed, 153 insertions(+), 17 deletions(-)
 create mode 100644 dlls/kernel32/tests/power.c

-- 
2.23.0




More information about the wine-devel mailing list