Skip to content

Commit c55ba26

Browse files
committed
Battery (macOS): add status Discharging to be consistant with other platforms
1 parent aae66aa commit c55ba26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/detection/battery/battery_apple.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ const char* ffDetectBattery(FFBatteryOptions* options, FFlist* results)
6060

6161
if (!ffCfDictGetBool(properties, CFSTR("ExternalConnected"), &boolValue) && boolValue)
6262
ffStrbufAppendS(&battery->status, "AC connected, ");
63+
else
64+
ffStrbufAppendS(&battery->status, "Discharging, ");
6365
if (!ffCfDictGetBool(properties, CFSTR("IsCharging"), &boolValue) && boolValue)
6466
ffStrbufAppendS(&battery->status, "Charging, ");
6567
if (!ffCfDictGetBool(properties, CFSTR("AtCriticalLevel"), &boolValue) && boolValue)

0 commit comments

Comments
 (0)