Fix long report descriptor check

This commit is contained in:
pixl 2020-06-19 22:51:22 -04:00
parent f0c903d539
commit f2a7b7b947
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E
3 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ using namespace logid;
Device::Device(std::string path, backend::hidpp::DeviceIndex index) :
_hidpp20 (path, index), _path (path), _index (index)
{
log_printf(DEBUG, "logid::Device created on %s:%d");
log_printf(DEBUG, "logid::Device created on %s:%d", _path.c_str(), _index);
}
void Device::sleep()

View File

@ -14,6 +14,8 @@ using namespace logid::backend;
void DeviceManager::addDevice(std::string path)
{
log_printf(DEBUG, "Scanning %s for devices.", path.c_str());
bool defaultExists = true;
bool isReceiver = false;
try {

View File

@ -76,7 +76,7 @@ uint8_t hidpp::getSupportedReports(std::vector<uint8_t>&& rdesc)
if(it != rdesc.end())
ret |= HIDPP_REPORT_SHORT_SUPPORTED;
it = std::search(rdesc.begin(), rdesc.end(), LongReportDesc.begin(), LongReportDesc2.end());
it = std::search(rdesc.begin(), rdesc.end(), LongReportDesc.begin(), LongReportDesc.end());
if(it == rdesc.end())
it = std::search(rdesc.begin(), rdesc.end(), LongReportDesc2.begin(), LongReportDesc2.end());
if(it != rdesc.end())