Skip to content

Commit

Permalink
Update horizontreadmill.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein authored Dec 10, 2024
1 parent b573442 commit f8aa63d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/devices/horizontreadmill/horizontreadmill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2316,8 +2316,11 @@ bool horizontreadmill::discoverServicesWin11(const QBluetoothAddress& address) {
BLUETOOTH_DEVICE_INFO deviceInfo = { sizeof(BLUETOOTH_DEVICE_INFO) };
deviceInfo.Address.ullLong = address.toUInt64();

if (BluetoothGetDeviceInfo(nullptr, &deviceInfo) != ERROR_SUCCESS) {
qDebug() << "Failed to get device info";
DWORD error = BluetoothGetDeviceInfo(nullptr, &deviceInfo);
if (error != ERROR_SUCCESS) {
qDebug() << "Failed to get device info. Error code:" << error;
DWORD lastError = GetLastError();
qDebug() << "Last error:" << lastError;
return false;
}

Expand Down

0 comments on commit f8aa63d

Please sign in to comment.