Current implementation of system.fill_battery_state only reads "charge\__" and "current\__" attributes. Some batteries expose different attributes, namely "power\__" and "energy\__". Added the required logic to support both types.
Further, when rewriting the function I also added support for systems with multiple batteries. Windows documentation was not clear but from what I gathered struct SYSTEM_BATTERY_STATE sets Charging and Discharging if ANY battery is charging/discharging. So, to check if the overall system is charging/discharging only Rate can be used.
Also cleaned the code related to "AC". There was a "fixme" there which I didn't fully undertand as SYSTEM_BATTERY_STATE.AcOnLine == True if any AC is present, so the proper logic was already implemented
--
v10: ntdll: improve readibility of linux_battery capacity units
ntdll: Support multi-battery systems and batteries that expose energy_* and power_*
https://gitlab.winehq.org/wine/wine/-/merge_requests/8460
Implementation PersistentZoneIdentifer object without any writing and reading zone information. OS Windows uses NTFS alternative data stream Zone.Identifer to write and read zone information.
--
v9: urlmon: Add PersistentZoneIdentifier test cases
urlmon: Add PersistentZoneIdentifier semi-stubs
https://gitlab.winehq.org/wine/wine/-/merge_requests/8459
This MR enforces alignment of TLS slots as described in PE file.
--
v4: ntdll: Let layout of TLS vector be closer to native.
ntdll: Enforce the alignment of TLS directory entries.
kernel32: Add test for TLS memory layout.
kernel32/tests: Add a test about TLS slot alignment.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7251