mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-22 04:13:07 +00:00
mc.mitm: fix queue logic for async responses
This commit is contained in:
parent
6c1c8306ef
commit
bfb1e6cb78
1 changed files with 6 additions and 6 deletions
|
@ -79,8 +79,8 @@ namespace ams::controller {
|
|||
}
|
||||
|
||||
if (!m_future_responses.empty()) {
|
||||
if ((m_future_responses.back()->GetType() == BtdrvHidEventType_Data) && (m_future_responses.back()->GetUserData() == report->data[0])) {
|
||||
m_future_responses.back()->SetData(*event_info);
|
||||
if ((m_future_responses.front()->GetType() == BtdrvHidEventType_Data) && (m_future_responses.front()->GetUserData() == report->data[0])) {
|
||||
m_future_responses.front()->SetData(*event_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,8 @@ namespace ams::controller {
|
|||
|
||||
Result SwitchController::HandleSetReportEvent(const bluetooth::HidReportEventInfo *event_info) {
|
||||
if (!m_future_responses.empty()) {
|
||||
if (m_future_responses.back()->GetType() == BtdrvHidEventType_SetReport) {
|
||||
m_future_responses.back()->SetData(*event_info);
|
||||
if (m_future_responses.front()->GetType() == BtdrvHidEventType_SetReport) {
|
||||
m_future_responses.front()->SetData(*event_info);
|
||||
}
|
||||
|
||||
R_SUCCEED();
|
||||
|
@ -119,8 +119,8 @@ namespace ams::controller {
|
|||
|
||||
Result SwitchController::HandleGetReportEvent(const bluetooth::HidReportEventInfo *event_info) {
|
||||
if (!m_future_responses.empty()) {
|
||||
if (m_future_responses.back()->GetType() == BtdrvHidEventType_GetReport) {
|
||||
m_future_responses.back()->SetData(*event_info);
|
||||
if (m_future_responses.front()->GetType() == BtdrvHidEventType_GetReport) {
|
||||
m_future_responses.front()->SetData(*event_info);
|
||||
}
|
||||
|
||||
R_SUCCEED();
|
||||
|
|
Loading…
Reference in a new issue