Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCPadEmu: stop sticks wrapping at extreme values #652

Merged
merged 1 commit into from Jul 19, 2014

Conversation

booto
Copy link
Contributor

@booto booto commented Jul 19, 2014

Extreme values (i.e. -1.0) of x/y were causing the stick values to wrap

@JMC47
Copy link
Contributor

JMC47 commented Jul 19, 2014

Fixes and extremely annoying bug. LGTM

@magcius
Copy link
Member

magcius commented Jul 19, 2014

This is my fault. The code before was doing 0x80 + (x * 0x7F) and I accidentally switched them around. We should probably keep 0x80 as the center.

@JMC47
Copy link
Contributor

JMC47 commented Jul 19, 2014

It's not your fault, even before your merge this could happen in a lot of games.

@booto
Copy link
Contributor Author

booto commented Jul 19, 2014

Changed the centers back to being 0x80

@lioncash
Copy link
Member

If the centers are 0x80 in this case, we do have a constant to represent that if it helps readability in the future: here

@delroth
Copy link
Member

delroth commented Jul 19, 2014

Not really happy about the use of magic consts, but this is a fairly major bug.

delroth added a commit that referenced this pull request Jul 19, 2014
GCPadEmu: stop sticks wrapping at extreme values
@delroth delroth merged commit 56e9efc into dolphin-emu:master Jul 19, 2014
@magcius
Copy link
Member

magcius commented Jul 19, 2014

Interesting. I only found out the "correct" origin because of https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/Core/HW/GCPad.cpp#L57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants