On Thu Jul 17 08:44:35 2025 +0000, Vibhav Pant wrote:
Am I to assume `SYSTEM_BATTERY_STATE.AcOnLine` in
`system.fill_battery_state` holds a value reflecting the system's actual state? It would be best to go by what Windows does here. `SYSTEM_BATTERY_STATE.AcOnLine` is set to 1 on a virtualized Windows 11 install, so we should probably always set it to 1 as well.
On `systemc.fill_battery_state` modified: ``` 4084 // Windows's SYSTEM_BATTERY_STATE always returns AcOnLine=TRUE 4085 bs->AcOnLine = TRUE; ```
Left the polling logic even though the condition never evaluates as `True`. Let me know if you think differently: ``` 4103 if (!strcmp(s, "Mains\n") && 4104 !bs->AcOnLine && 4105 get_sys_int(path, "online")) 4106 { 4107 bs->AcOnLine = TRUE; 4108 } ```