Skip to content

Commit

Permalink
Added garbage packet filter for USB (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius authored Aug 23, 2024
1 parent 8f97e90 commit 29c6709
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sys/DsHidMiniDrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,15 @@ VOID DsUsb_EvtUsbInterruptPipeReadComplete(
DMF_CONTEXT_DsHidMini* pModCtx = DMF_CONTEXT_GET((DMFMODULE)pDevCtx->DsHidMiniModule);
const PDS3_RAW_INPUT_REPORT pInReport = (PDS3_RAW_INPUT_REPORT)WdfMemoryGetBuffer(Buffer, NULL);

//
// Some controllers occasionally send this broken report, ignore packet
//
if (pInReport->Reserved0 == 0xFF)
{
FuncExitNoReturn(TRACE_DSHIDMINIDRV);
return;
}

QueryPerformanceFrequency(&freq);
LARGE_INTEGER* t1 = &pDevCtx->Connection.Usb.ChargingCycleTimestamp;

Expand Down

0 comments on commit 29c6709

Please sign in to comment.