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

LilyPad: add Dance Pad support #1412

Merged
merged 1 commit into from Jun 19, 2016
Merged

LilyPad: add Dance Pad support #1412

merged 1 commit into from Jun 19, 2016

Conversation

FlatOutPS2
Copy link
Contributor

@FlatOutPS2 FlatOutPS2 commented Jun 16, 2016

Adds support for dance pads used in games like the Dance Dance Revolution series.
Fixes #492

@@ -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.

This comment was marked as spam.

@FlatOutPS2 FlatOutPS2 force-pushed the master branch 2 times, most recently from 2518e25 to 94def87 Compare June 17, 2016 11:18
@FlatOutPS2
Copy link
Contributor Author

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.

This comment was marked as spam.

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.

Adds support for dance pads used in games like the Dance Dance
Revolution series.
@turtleli
Copy link
Member

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).

@FlatOutPS2
Copy link
Contributor Author

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

@ssakash
Copy link
Member

ssakash commented Jun 18, 2016

Note: It also makes it hard to track your previous commits in case a regression pops up. I could just go here and press the no.of commits to view all of my older commits. I assume your older contributions aren't being recorded due to the invalid Email. Refer here for more information.

@turtleli turtleli merged commit ce8b9c1 into PCSX2:master Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants