From dee4b36a465c483dec1e15108d07ed1de4da0d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 13 Feb 2026 15:39:07 +0800 Subject: [PATCH] Bluetooth (Windows): use modern dlls --- src/detection/bluetooth/bluetooth_windows.c | 8 +++++++- src/detection/bluetoothradio/bluetoothradio_windows.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/detection/bluetooth/bluetooth_windows.c b/src/detection/bluetooth/bluetooth_windows.c index 050929fee..bfae307d0 100644 --- a/src/detection/bluetooth/bluetooth_windows.c +++ b/src/detection/bluetooth/bluetooth_windows.c @@ -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) diff --git a/src/detection/bluetoothradio/bluetoothradio_windows.c b/src/detection/bluetoothradio/bluetoothradio_windows.c index 057bf2933..b773b511e 100644 --- a/src/detection/bluetoothradio/bluetoothradio_windows.c +++ b/src/detection/bluetoothradio/bluetoothradio_windows.c @@ -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)