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
LilyPad: add Dance Pad support #1412
Conversation
@@ -163,7 +163,7 @@ struct Stick { | |||
|
|||
// Sum of states of all controls for a pad (Not including toggles). | |||
struct ButtonSum { | |||
int buttons[12]; | |||
int buttons[16]; | |||
Stick sticks[3]; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
2518e25
to
94def87
Compare
Rewrote the code to replace the d-pad stick with buttons. |
@@ -604,15 +593,15 @@ void Update(unsigned int port, unsigned int slot) { | |||
int id = idList[i] - 0x1104; | |||
s[port][slot].buttons[id] = values[i]; | |||
} | |||
if (abs(s[port][slot].sticks[0].vert) <= 48) { | |||
if (abs(s[port][slot].buttons[14]) <= 48) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
for (int i=0; i<5; i++) { | ||
unsigned int id = idList[i] - 0x1104; | ||
if (pads[port][slot].sum.buttons[id] < s[port][slot].buttons[id]) { | ||
s[port][slot].buttons[id] = pads[port][slot].sum.buttons[id]; | ||
} | ||
} | ||
} | ||
else if (abs(pads[port][slot].sum.sticks[0].vert) <= 48) { | ||
else if (s[port][slot].buttons[14] <= 48 && s[port][slot].buttons[12] <= 48) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
a97ba8b
to
1157f74
Compare
Adds support for dance pads used in games like the Dance Dance Revolution series.
Code seems fine. I'll leave the PR for a day or two before merging to give people time to test (or nitpick). Side note: Having your git email as 'lol' makes it a bit harder to find your commits in github. It's up to you whether you change it to something Github recognises though (I can easily find your commits with the git command line, so it doesn't matter so much to me). |
I think I set that up in the Github app, but it doesn't say that's the email, or that it's been used for my git work. :p |
Adds support for dance pads used in games like the Dance Dance Revolution series.
Fixes #492