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 dlesho@codeweavers.com --- 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;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=56701
Your paranoid android.
=== debian10 (32 bit report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00439c72).
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (32 bit Chinese:China report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00439c72). debugger: Timeout
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (32 bit WoW report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00439c72).
Report errors: kernel32:virtual prints too much data (91050 bytes)
=== debian10 (64 bit WoW report) ===
kernel32: Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x00439c72).
Report errors: kernel32:virtual prints too much data (91050 bytes)