Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9322 from jordan-woyak/fix-real-wm-delay
HW/WiimoteReal: Drop stale data reports.
  • Loading branch information
lioncash committed Dec 12, 2020
2 parents fa0e5e3 + 0fa6bde commit d312495
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -411,11 +411,16 @@ bool Wiimote::GetNextReport(Report* report)
// Returns the next report that should be sent
Report& Wiimote::ProcessReadQueue(bool repeat_last_data_report)
{
if (!GetNextReport(&m_last_input_report) &&
!(IsDataReport(m_last_input_report) && repeat_last_data_report))
{
// If we didn't get a new report and it's not a data report to repeat, it's irrelevant.
// If we're not repeating data reports or had a non-data report, any old report is irrelevant.
if (!repeat_last_data_report || !IsDataReport(m_last_input_report))
m_last_input_report.clear();

// Step through the read queue.
while (GetNextReport(&m_last_input_report))
{
// Stop on a non-data report.
if (!IsDataReport(m_last_input_report))
break;
}

return m_last_input_report;
Expand Down

0 comments on commit d312495

Please sign in to comment.