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
--
v15: ntdll: improve readibility of linux_battery capacity units
ntdll: Support multi-battery systems and batteries that expose energy_* and power_*
ntdll: Add enum, struct for battery status, information
ntdll: Fix test with proper battery EstimatedTime expected value
ntdll: Update tests to use just Rate for charging logic
https://gitlab.winehq.org/wine/wine/-/merge_requests/8460
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: dwrite/opentype: Use mask shifts only for non-zero masks.
dwrite/layout: Do not shadow output parameter.
dwrite/layout: Always initialize effective run bounding box.
dwrite: Always initialize 'contours' flag.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8981
This format is used for video output with a depth of 10 bits per channel. Decoding at 10-bit quality is not currently supported, but this patch makes video playable.
--
v4: mfmediaengine: Support video output in format R10G10B10A2.
mfmediaengine: Rename media_engine_transfer_to_d3d11_texture() helper function.
mfmediaengine/tests: Test output to format R10G10B10A2 from H.264.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8531