mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
BluetoothRadio (macOS): add dirty support
This commit is contained in:
@@ -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