diff options
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r-- | core/btdiscovery.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 0bacbadda..deef322e4 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -305,6 +305,15 @@ bool BTDiscovery::checkException(const char* method, const QAndroidJniObject *ob void BTDiscovery::discoverAddress(QString address) { +#if defined(Q_OS_MACOS) + // macOS appears to need a fresh scan if we want to switch devices + static QString lastAddress; + if (lastAddress != address) { + btDeviceInfo.clear(); + discoveryAgent->stop(); + lastAddress = address; + } +#endif if (!btDeviceInfo.keys().contains(address) && !discoveryAgent->isActive()) { qDebug() << "restarting discovery agent"; discoveryAgent->start(); |