Bluetooth (macOS): normalize mac address strings

This commit is contained in:
李通洲
2024-11-05 16:39:04 +08:00
parent ef974ef8c0
commit 9a34cb98dc
2 changed files with 4 additions and 0 deletions
@@ -21,6 +21,8 @@ const char* ffDetectBluetooth(FFlist* devices /* FFBluetoothResult */)
FFBluetoothResult* device = ffListAdd(devices);
ffStrbufInitS(&device->name, ioDevice.name.UTF8String);
ffStrbufInitS(&device->address, ioDevice.addressString.UTF8String);
ffStrbufReplaceAllC(&device->address, '-', ':');
ffStrbufUpperCase(&device->address);
ffStrbufInit(&device->type);
if (ioDevice.batteryPercentSingle)
+2
View File
@@ -10,5 +10,7 @@
<string>@PROJECT_VERSION@</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>For detecting Bluetooth devices</string>
</dict>
</plist>