mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 07:09:03 +00:00
Merge pull request #652 from booto/controller_stick_wrap_fix
GCPadEmu: stop sticks wrapping at extreme values
This commit is contained in:
commit
56e9efc611
1 changed files with 4 additions and 4 deletions
|
@ -103,12 +103,12 @@ void GCPad::GetInput(GCPadStatus* const pad)
|
||||||
|
|
||||||
// sticks
|
// sticks
|
||||||
m_main_stick->GetState(&x, &y);
|
m_main_stick->GetState(&x, &y);
|
||||||
pad->stickX = 0x7F + (x * 0x80);
|
pad->stickX = 0x80 + (x * 0x7F);
|
||||||
pad->stickY = 0x7F + (y * 0x80);
|
pad->stickY = 0x80 + (y * 0x7F);
|
||||||
|
|
||||||
m_c_stick->GetState(&x, &y);
|
m_c_stick->GetState(&x, &y);
|
||||||
pad->substickX = 0x7F + (x * 0x80);
|
pad->substickX = 0x80 + (x * 0x7F);
|
||||||
pad->substickY = 0x7F + (y * 0x80);
|
pad->substickY = 0x80 + (y * 0x7F);
|
||||||
|
|
||||||
// triggers
|
// triggers
|
||||||
m_triggers->GetState(&pad->button, trigger_bitmasks, triggers);
|
m_triggers->GetState(&pad->button, trigger_bitmasks, triggers);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue