diff options
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r-- | core/downloadfromdcthread.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index e67d71403..0cc5a204c 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -109,21 +109,20 @@ void fill_computer_list() dc_iterator_t *iterator = NULL; dc_descriptor_t *descriptor = NULL; - int transportMask = 0; + // start out with the list of transports that libdivecomputer claims to support + // dc_context_get_transports ignores its context argument... + int transportMask = dc_context_get_transports(NULL); + + // then add the ones that we have our own implementations for #if defined(BT_SUPPORT) transportMask |= DC_TRANSPORT_BLUETOOTH; #endif #if defined(BLE_SUPPORT) transportMask |= DC_TRANSPORT_BLE; #endif -#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) && !defined(Q_OS_MAC) - transportMask |= DC_TRANSPORT_IRDA; -#endif -#if !defined(Q_OS_IOS) - transportMask |= DC_TRANSPORT_USB | DC_TRANSPORT_USBHID; -#endif -#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) - transportMask |= DC_TRANSPORT_SERIAL; +#if defined(Q_OS_IOS) + // libdivecomputer always claims to support serial, but on iOS we actually don't support that + transportMask &= ~DC_TRANSPORT_SERIAL; #endif fill_supported_mobile_list(); |