Fix long report descriptor check
This commit is contained in:
		@@ -6,7 +6,7 @@ using namespace logid;
 | 
				
			|||||||
Device::Device(std::string path, backend::hidpp::DeviceIndex index) :
 | 
					Device::Device(std::string path, backend::hidpp::DeviceIndex index) :
 | 
				
			||||||
    _hidpp20 (path, index), _path (path), _index (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()
 | 
					void Device::sleep()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,6 +14,8 @@ using namespace logid::backend;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void DeviceManager::addDevice(std::string path)
 | 
					void DeviceManager::addDevice(std::string path)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    log_printf(DEBUG, "Scanning %s for devices.", path.c_str());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool defaultExists = true;
 | 
					    bool defaultExists = true;
 | 
				
			||||||
    bool isReceiver = false;
 | 
					    bool isReceiver = false;
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,7 +76,7 @@ uint8_t hidpp::getSupportedReports(std::vector<uint8_t>&& rdesc)
 | 
				
			|||||||
    if(it != rdesc.end())
 | 
					    if(it != rdesc.end())
 | 
				
			||||||
        ret |= HIDPP_REPORT_SHORT_SUPPORTED;
 | 
					        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())
 | 
					    if(it == rdesc.end())
 | 
				
			||||||
        it = std::search(rdesc.begin(), rdesc.end(), LongReportDesc2.begin(), LongReportDesc2.end());
 | 
					        it = std::search(rdesc.begin(), rdesc.end(), LongReportDesc2.begin(), LongReportDesc2.end());
 | 
				
			||||||
    if(it != rdesc.end())
 | 
					    if(it != rdesc.end())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user