Changeset 14464 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 21, 2008 3:03:53 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r13079 r14464 142 142 #define BAT_TECH_PRIMARY 1 143 143 #define BAT_TECH_SECONDARY 2 144 145 #define BAT_STATUS_DISCHARGING_MASK RT_BIT(0)146 #define BAT_STATUS_CHARGING_MASK RT_BIT(1)147 #define BAT_STATUS_CRITICAL_MASK RT_BIT(2)148 144 149 145 #define STA_DEVICE_PRESENT_MASK RT_BIT(0) -
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r12642 r14464 211 211 uint32_t uBs = PDM_ACPI_BAT_STATE_CHARGED; 212 212 if (powerStatus.BatteryFlag & 8) 213 uBs = PDM_ACPI_BAT_STATE_CHARGING; 214 else if (powerStatus.ACLineStatus == 0 || powerStatus.ACLineStatus == 255) 213 215 uBs = PDM_ACPI_BAT_STATE_DISCHARGING; 214 else if (powerStatus.ACLineStatus == 0 || powerStatus.ACLineStatus == 255)215 uBs = PDM_ACPI_BAT_STATE_CHARGING;216 216 if (powerStatus.BatteryFlag & 4) 217 217 uBs |= PDM_ACPI_BAT_STATE_CRITICAL; … … 396 396 uint32_t uBs = PDM_ACPI_BAT_STATE_CHARGED; 397 397 if (fDischarging) 398 uBs = PDM_ACPI_BAT_STATE_DISCHARGING; 399 else if (fCharging) 398 400 uBs = PDM_ACPI_BAT_STATE_CHARGING; 399 else if (fCharging)400 uBs = PDM_ACPI_BAT_STATE_DISCHARGING;401 401 if (fCritical) 402 402 uBs |= PDM_ACPI_BAT_STATE_CRITICAL;
Note:
See TracChangeset
for help on using the changeset viewer.