From: Derek Lesho Subject: [PATCH] kernel32: Report 'No System Battery' in GetSystemPowerStatus Message-Id: <20190920201152.19236-1-dlesho@codeweavers.com> Date: Fri, 20 Sep 2019 15:11:52 -0500 Nine Chapters naively checks for the low and critical battery flags, ignoring the possibility that the Battery status is unknown. Fixes Proton bug #3068 Signed-off-by: Derek Lesho --- dlls/kernel32/powermgnt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/powermgnt.c b/dlls/kernel32/powermgnt.c index 190dc016c3..cb5bb5237b 100644 --- a/dlls/kernel32/powermgnt.c +++ b/dlls/kernel32/powermgnt.c @@ -50,7 +50,8 @@ BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS ps) if (ps) { ps->ACLineStatus = 255; - ps->BatteryFlag = 255; + /* Nine Parchments doesn't handle an unknown battery status correctly. */ + ps->BatteryFlag = 128; ps->BatteryLifePercent = 255; ps->Reserved1 = 0; ps->BatteryLifeTime = ~0u; -- 2.23.0