| 108 | } |
| 109 | |
| 110 | Result Dualshock3Controller::GetInput() |
| 111 | { |
| 112 | |
| 113 | uint8_t input_bytes[49]; |
| 114 | |
| 115 | Result rc = m_inPipe->Read(input_bytes, sizeof(input_bytes)); |
| 116 | if (R_FAILED(rc)) |
| 117 | return rc; |
| 118 | |
| 119 | if (input_bytes[0] == Ds3InputPacket_Button) |
| 120 | { |
| 121 | m_buttonData = *reinterpret_cast<Dualshock3ButtonData *>(input_bytes); |
| 122 | } |
| 123 | return rc; |
| 124 | } |
| 125 | |
| 126 | float Dualshock3Controller::NormalizeTrigger(uint8_t deadzonePercent, uint8_t value) |
| 127 | { |