mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
core/bluetooth: only Linux / Windows are supported by libdc rfcomm
For Android the Qt Bluetooth code seems to work just fine. And for macOS nothing appears to work right now, but at least the Qt implementation compiles and links. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e1befbea0a
commit
780cb4fce7
1 changed files with 5 additions and 0 deletions
|
@ -1383,7 +1383,12 @@ dc_status_t divecomputer_device_open(device_data_t *data)
|
|||
#ifdef BT_SUPPORT
|
||||
if (transports & DC_TRANSPORT_BLUETOOTH) {
|
||||
dev_info(data, "Opening rfcomm stream %s", data->devname);
|
||||
#if defined(__ANDROID__) || defined(__APPLE__)
|
||||
// we don't have BT on iOS in the first place, so this is for Android and macOS
|
||||
rc = rfcomm_stream_open(&data->iostream, context, data->devname);
|
||||
#else
|
||||
rc = bluetooth_device_open(&data->iostream, context, data);
|
||||
#endif
|
||||
if (rc == DC_STATUS_SUCCESS)
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue