mirror of
https://github.com/ndeadly/MissionControl
synced 2025-02-16 21:28:25 +00:00
mc.mitm: correct SwitchAnalogStick SetX and SetY functions
This commit is contained in:
parent
31250f09fb
commit
7a1ea1f8af
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ namespace ams::controller {
|
|||
|
||||
void SwitchAnalogStick::SetX(uint16_t x) {
|
||||
m_xy[0] = x & 0xff;
|
||||
m_xy[1] |= x >> 8;
|
||||
m_xy[1] = (m_xy[1] & 0xf0) | (x >> 8);
|
||||
}
|
||||
|
||||
void SwitchAnalogStick::SetY(uint16_t y) {
|
||||
m_xy[1] |= (y & 0xff) << 4;
|
||||
m_xy[1] = (m_xy[1] & 0x0f) | ((y & 0xff) << 4);
|
||||
m_xy[2] = (y >> 4) & 0xff;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue