mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
DBus: expands Get(U)Int to (u)int64
This commit is contained in:
@@ -69,7 +69,7 @@ static bool detectBluetoothValue(FFDBusData* dbus, DBusMessageIter* iter, FFBlue
|
||||
} else if (ffStrEquals(deviceProperty, "Icon")) {
|
||||
ffDBusGetString(dbus, &dictIter, &device->type);
|
||||
} else if (ffStrEquals(deviceProperty, "Percentage")) {
|
||||
uint32_t percentage;
|
||||
uint64_t percentage;
|
||||
if (ffDBusGetUint(dbus, &dictIter, &percentage)) {
|
||||
device->battery = (uint8_t) percentage;
|
||||
}
|
||||
|
||||
@@ -56,12 +56,15 @@ static const char* detectBluetoothProperty(FFBluetoothRadioResult* device, FFDBu
|
||||
} else if (ffStrEquals(deviceProperty, "Alias")) {
|
||||
ffDBusGetString(dbus, &dictIter, &device->name);
|
||||
} else if (ffStrEquals(deviceProperty, "Manufacturer")) {
|
||||
uint32_t vendorId;
|
||||
uint64_t vendorId;
|
||||
if (ffDBusGetUint(dbus, &dictIter, &vendorId)) {
|
||||
ffStrbufSetStatic(&device->vendor, ffBluetoothRadioGetVendor(vendorId));
|
||||
ffStrbufSetStatic(&device->vendor, ffBluetoothRadioGetVendor((uint32_t) vendorId));
|
||||
}
|
||||
} else if (ffStrEquals(deviceProperty, "Version")) {
|
||||
ffDBusGetUint(dbus, &dictIter, (uint32_t*) &device->lmpVersion);
|
||||
uint64_t version;
|
||||
if (ffDBusGetUint(dbus, &dictIter, &version)) {
|
||||
device->lmpVersion = (int32_t) version;
|
||||
}
|
||||
} else if (ffStrEquals(deviceProperty, "Powered")) {
|
||||
ffDBusGetBool(dbus, &dictIter, &device->enabled);
|
||||
} else if (ffStrEquals(deviceProperty, "Discoverable")) {
|
||||
|
||||
Reference in New Issue
Block a user