Skip to content

Commit

Permalink
Swap Yellow and Blue in PS3 guitar report
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjay900 authored and AKuHAK committed Mar 23, 2023
1 parent b977f8e commit d26da79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/ds34common.h
Expand Up @@ -179,10 +179,10 @@ struct ds3guitarreport
};
struct
{
uint16_t Yellow : 1;
uint16_t Blue : 1;
uint16_t Green : 1;
uint16_t Red : 1;
uint16_t Blue : 1;
uint16_t Yellow : 1;
uint16_t Orange : 1;
uint16_t StarPower : 1;
uint16_t : 1;
Expand Down
5 changes: 3 additions & 2 deletions modules/pademu/ds34common.c
Expand Up @@ -31,12 +31,13 @@ void translate_pad_guitar(const struct ds3guitarreport *in, struct ds2report *ou

if (guitar_hero_format) {
// GH PS3 Guitars swap Yellow and Blue
out->nButtonStateH = ~(in->Green << 1 | in->Yellow << 4 | in->Red << 5 | in->Blue << 6 | in->Orange << 7);
// Interestingly, it is only GH PS3 Guitars that do this, all the other instruments including GH Drums don't have this swapped.
out->nButtonStateH = ~(in->Green << 1 | in->Blue << 4 | in->Red << 5 | in->Yellow << 6 | in->Orange << 7);
if (in->AccelX > 512 || in->AccelX < 432) {
out->nL2 = 0;
}
} else {
out->nButtonStateH = ~(in->StarPower | in->Green << 1 | in->Blue << 4 | in->Red << 5 | in->Yellow << 6 | in->Orange << 7);
out->nButtonStateH = ~(in->StarPower | in->Green << 1 | in->Yellow << 4 | in->Red << 5 | in->Blue << 6 | in->Orange << 7);
}
}

Expand Down

0 comments on commit d26da79

Please sign in to comment.