Skip to content

Commit

Permalink
v0.7.6-RC3 FIX: Hot-fix for counter increment (#728)
Browse files Browse the repository at this point in the history
Hot-fix for counter increment
  • Loading branch information
arntsonl committed Dec 27, 2023
1 parent 5e8761c commit fc4ba03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,9 @@ XboxOneGamepad_Data_t *Gamepad::getXBOneReport()
if ( memcmp(&last_report[4], &((uint8_t*)&newInputReport)[4], sizeof(XboxOneGamepad_Data_t)-4) != 0 ) {
xboneReportSize = sizeof(XboxOneGamepad_Data_t);
memcpy(&xboneReport, &newInputReport, xboneReportSize);
xboneReport.Header.sequence = (last_report_counter + 1 == 0) ? 1 : last_report_counter + 1;
xboneReport.Header.sequence = last_report_counter + 1;
if ( xboneReport.Header.sequence == 0 )
xboneReport.Header.sequence = 1;
}

return &xboneReport;
Expand Down

0 comments on commit fc4ba03

Please sign in to comment.