Skip to content

Commit

Permalink
Code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Jan 16, 2021
1 parent 66feefd commit 05b3997
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/controllers/hid/hidcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,16 @@ QList<int> HidController::getInputReport(unsigned int reportID) {
CurrentBuffer[0] = reportID;
bytesRead = hid_get_input_report(m_pHidDevice, CurrentBuffer, kBufferSize);

controllerDebug(bytesRead << "bytes received by hid_get_input_report" << getName()
<< "serial #" << m_deviceInfo.serialNumber()
<< "(including one byte for the report ID:" << QString::number(static_cast<quint8>(reportID), 16).toUpper().rightJustified(2, QChar('0')) << ")"
)

if (bytesRead < 0) {
controllerDebug(bytesRead
<< "bytes received by hid_get_input_report" << getName()
<< "serial #" << m_deviceInfo.serialNumber()
<< "(including one byte for the report ID:"
<< QString::number(static_cast<quint8>(reportID), 16)
.toUpper()
.rightJustified(2, QChar('0'))
<< ")")

if (bytesRead < 0) {
// -1 is the only error value according to hidapi documentation. Otherwise minimum possible value is 1, because 1 byte is for the reportID.
DEBUG_ASSERT(bytesRead < 0);
return QList<int>();
Expand Down

0 comments on commit 05b3997

Please sign in to comment.