diff options
| author | JMC47 <JMC4789@gmail.com> | 2019-02-21 13:54:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-21 13:54:43 -0500 |
| commit | 3426c985f93801cf07fe88e2d0be73cea70a2cc0 (patch) | |
| tree | beeea17c590f5417e8c01edc66852550ae0a468d /Source | |
| parent | 286aafd4ed2949f0b93230fee969c6a32fe75f07 (diff) | |
| parent | 58f1ff3773935187092109716e0e19b1aa260f0f (diff) | |
Merge pull request #7812 from jordan-woyak/wiimote-emu-minor
WiimoteEmu: Minor accuracy fixes.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h | 9 | ||||
| -rw-r--r-- | Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h b/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h index 18b0293804..58332383d0 100644 --- a/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h +++ b/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h @@ -84,8 +84,9 @@ static_assert(sizeof(OutputReportRequestStatus) == 1, "Wrong size"); struct OutputReportWriteData { u8 rumble : 1; + u8 : 1; u8 space : 2; - u8 : 5; + u8 : 4; // A real wiimote ignores the i2c read/write bit. u8 i2c_rw_ignored : 1; // Used only for register space (i2c bus) (7-bits): @@ -100,8 +101,9 @@ static_assert(sizeof(OutputReportWriteData) == 21, "Wrong size"); struct OutputReportReadData { u8 rumble : 1; + u8 : 1; u8 space : 2; - u8 : 5; + u8 : 4; // A real wiimote ignores the i2c read/write bit. u8 i2c_rw_ignored : 1; // Used only for register space (i2c bus) (7-bits): @@ -114,7 +116,8 @@ static_assert(sizeof(OutputReportReadData) == 6, "Wrong size"); struct OutputReportSpeakerData { - u8 unknown : 3; + u8 rumble : 1; + u8 : 2; u8 length : 5; u8 data[20]; }; diff --git a/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp index 99f622a904..354a748b8f 100644 --- a/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp @@ -45,7 +45,8 @@ void Wiimote::HandleReportMode(const OutputReportMode& dr) m_reporting_continuous = dr.continuous; m_reporting_mode = dr.mode; - SendAck(OutputReportID::ReportMode, ErrorCode::Success); + if (dr.ack) + SendAck(OutputReportID::ReportMode, ErrorCode::Success); } // Tests that we have enough bytes for the report before we run the handler. @@ -322,6 +323,7 @@ void Wiimote::HandleWriteData(const OutputReportWriteData& wd) break; } + // Real wiimotes seem to always ACK data writes. SendAck(OutputReportID::WriteData, error_code); } @@ -426,6 +428,8 @@ void Wiimote::HandleReadData(const OutputReportReadData& rd) // If more data needs to be sent it will happen on the next "Update()" // TODO: should this be removed and let Update() take care of it? ProcessReadDataRequest(); + + // FYI: No "ACK" is sent. } bool Wiimote::ProcessReadDataRequest() |
