Rémi Bernon (@rbernon) commented about dlls/winebus.sys/main.c:
RtlEnterCriticalSection(&ext->cs); list_add_tail(&ext->reports, &report->entry);
- if (!ext->collection_desc.ReportIDs[0].ReportID) last_report = ext->last_reports[0];
- for ( i = 0; i < ext->collection_desc.CollectionDescLength; ++i )
- {
HIDP_COLLECTION_DESC *desc = &ext->collection_desc.CollectionDesc[i];
for ( j = 0; j < ext->collection_desc.ReportIDsLength; ++j )
{
if (ext->collection_desc.ReportIDs[j].CollectionNumber != desc->CollectionNumber) continue;
if (!ext->collection_desc.ReportIDs[j].ReportID) last_report = ext->last_reports[0]; else last_report = ext->last_reports[report_buf[0]]; memcpy(last_report->buffer, report_buf, report_len);
break;
}
- }
I'm not sure to understand this. Is it to cover the case where some of the TLC use report IDs while other don't, and I don't think that can happen?