Controller: Always check for access byte

This commit is contained in:
Albert Liu
2021-02-21 15:20:31 -08:00
parent 30bcf280d4
commit 329e8317b4
12 changed files with 100 additions and 39 deletions

View File

@ -66,6 +66,7 @@ private:
enum class TransferState : u8
{
Idle,
Ready,
IDMSB,
ButtonsLSB,
ButtonsMSB,
@ -75,7 +76,7 @@ private:
AnalogL
};
std::array<u8, static_cast<u8>(Axis::Count)> m_axis_state {};
std::array<u8, static_cast<u8>(Axis::Count)> m_axis_state{};
// buttons are active low; bits 0-2, 8-10, 14-15 are not used and are always high
u16 m_button_state = UINT16_C(0xFFFF);