Skip to content

Commit dee4b36

Browse files
committed
Bluetooth (Windows): use modern dlls
1 parent d04a263 commit dee4b36

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/detection/bluetooth/bluetooth_windows.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
const char* ffDetectBluetooth(FFBluetoothOptions* options, FFlist* devices /* FFBluetoothResult */)
1111
{
1212
// Actually bluetoothapis.dll, but it's missing on Windows 7
13-
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis, "bthprops.cpl", 1)
13+
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis,
14+
#if FF_WIN7_COMPAT
15+
"bthprops.cpl"
16+
#else
17+
"bluetoothapis.dll"
18+
#endif
19+
, 1)
1420
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindFirstDevice)
1521
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindNextDevice)
1622
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindDeviceClose)

src/detection/bluetoothradio/bluetoothradio_windows.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ static_assert(sizeof(BTH_LOCAL_RADIO_INFO) == 292, "BTH_LOCAL_RADIO_INFO should
5454
const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */)
5555
{
5656
// Actually bluetoothapis.dll, but it's missing on Windows 7
57-
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis, "bthprops.cpl", 1)
57+
FF_LIBRARY_LOAD_MESSAGE(bluetoothapis,
58+
#if FF_WIN7_COMPAT
59+
"bthprops.cpl"
60+
#else
61+
"bluetoothapis.dll"
62+
#endif
63+
, 1)
5864
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindFirstRadio)
5965
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindNextRadio)
6066
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindRadioClose)

0 commit comments

Comments
 (0)