Bluetooth (Windows): use modern dlls

This commit is contained in:
李通洲
2026-02-13 15:39:07 +08:00
parent d04a26337a
commit dee4b36a46
2 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -10,7 +10,13 @@
const char* ffDetectBluetooth(FFBluetoothOptions* options, FFlist* devices /* FFBluetoothResult */)
{
// Actually bluetoothapis.dll, but it's missing on Windows 7
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis, "bthprops.cpl", 1)
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis,
#if FF_WIN7_COMPAT
"bthprops.cpl"
#else
"bluetoothapis.dll"
#endif
, 1)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindFirstDevice)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindNextDevice)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindDeviceClose)
@@ -54,7 +54,13 @@ static_assert(sizeof(BTH_LOCAL_RADIO_INFO) == 292, "BTH_LOCAL_RADIO_INFO should
const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */)
{
// Actually bluetoothapis.dll, but it's missing on Windows 7
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis, "bthprops.cpl", 1)
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis,
#if FF_WIN7_COMPAT
"bthprops.cpl"
#else
"bluetoothapis.dll"
#endif
, 1)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindFirstRadio)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindNextRadio)
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindRadioClose)