Short answer: our UI sucks bolas rojas.
Long answer: when the NT kernel informs the user-mode part of the system that the battery is no longer charging, the machine is directly powered up by the AC adapter.
This is understood by determining the presence of AC_LINE_ONLINE status bit in ACLineStatus member field, which is a Windows API construct.
In the NT world this is understood by checking the power state returned by the BATTERY_STATUS structure.
What's happening right now is that when the battery is fully charged, ROS UI simply displays "100% remaining" implying the battery is about to discharge, which is not the case.
This is extremely confusing to the user. AND WORST PART IS THAT IT'S XP/2003 DESIGN, AND I HATE IT UGGGHHH.
With this patch we're leaning towards Windows 10/11 way of informing the user the battery is fully charged. VIVA LA NT6!
CORE-18969
CORE-19452
We do have IDS_PWR_HOURS_REMAINING and IDS_PWR_MINUTES_REMAINING string resources but they're never used programmatically.
Display the estimated battery time ONLY if the returned time is not unknown.
CORE-18969
CORE-19452
Support for system batteries in ReactOS is really minimal to the point of non-existing. We are detecting the presence of any upcoming battery but since there's lacking in critical code that deals with communication
between PO and the battery class driver as the battery systray icon uses GetSystemPowerStatus to gather battery info which in turn inquires the power manager via NtPowerInformation(SystemBatteryState), we have
to report to the user that the remaining capacity is unknown rather than returning a pseudo capacity value.
Technically this so called "pesudo" value is just a construct denoted as BATTERY_PERCENTAGE_UNKNOWN. Not reporting the actual remaining capacity makes sense, as there could be a scenario where the battery may not
properly report its real datum, therefore it's best to be honest to the user what's really going on.
CORE-19452
CORE-18969
- Use GetSystemPowerStatus() instead of querying each battery.
- Add an ugly AC power icon. Should be fixed or replaced.
- Display AC power, battery charging, battery depleting and error cases. The AC power case was missing.
- Update some strings because we are no longer using float for the charge percentage.
@Turkish translators: Please check and update the translation of IDS_PWR_CHARGING!
- Volume, Power and Hotplug icon: Use timers to distinguish between single and double clicks.
- Volume icon: Show the tray volume dialog on a single click.