mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
BluetoothRadio (macOS): add dirty support
This commit is contained in:
+1
-1
@@ -631,7 +631,7 @@ elseif(APPLE)
|
||||
src/detection/battery/battery_apple.c
|
||||
src/detection/bios/bios_apple.c
|
||||
src/detection/bluetooth/bluetooth_apple.m
|
||||
src/detection/bluetoothradio/bluetoothradio_nosupport.c
|
||||
src/detection/bluetoothradio/bluetoothradio_apple.m
|
||||
src/detection/board/board_apple.c
|
||||
src/detection/bootmgr/bootmgr_apple.c
|
||||
src/detection/brightness/brightness_apple.c
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "bluetoothradio.h"
|
||||
|
||||
#import <IOBluetooth/IOBluetooth.h>
|
||||
|
||||
const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothResult */)
|
||||
{
|
||||
IOBluetoothHostController* ctrl = IOBluetoothHostController.defaultController;
|
||||
if(!ctrl)
|
||||
return "IOBluetoothHostController.defaultController failed";
|
||||
|
||||
FFBluetoothRadioResult* device = ffListAdd(devices);
|
||||
ffStrbufInitS(&device->name, ctrl.nameAsString.UTF8String);
|
||||
ffStrbufInitS(&device->address, ctrl.addressAsString.UTF8String);
|
||||
device->lmpVersion = 0;
|
||||
device->hciVersion = 0;
|
||||
device->lmpSubversion = 0;
|
||||
device->hciRevision = 0;
|
||||
|
||||
#ifdef __aarch64__
|
||||
device->vendor = "Apple";
|
||||
#else
|
||||
device->vendor = "Unknown"; // Hackintosh?
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user