Skip to content

Commit

Permalink
fixes DuroSoft#3
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Aug 25, 2018
1 parent 9db2d3f commit ce74f7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions XJoy/XJoy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ enum JOYCON_REGION {
LEFT_ANALOG,
LEFT_AUX,
RIGHT_BUTTONS,
RIGHT_AUX,
RIGHT_ANALOG
RIGHT_ANALOG,
RIGHT_AUX
};

enum JOYCON_BUTTON {
Expand Down Expand Up @@ -235,7 +235,7 @@ void disconnect_exit() {
}

void process_button(JOYCON_REGION region, JOYCON_BUTTON button) {
if(!(region == LEFT_ANALOG && button == L_ANALOG_NONE) || (region == RIGHT_ANALOG && button == R_ANALOG_NONE))
if(!((region == LEFT_ANALOG && button == L_ANALOG_NONE) || (region == RIGHT_ANALOG && button == R_ANALOG_NONE)))
std::cout << joycon_button_to_string(region, button) << " ";
switch(region) {
case LEFT_DPAD:
Expand Down Expand Up @@ -352,6 +352,7 @@ void process_button(JOYCON_REGION region, JOYCON_BUTTON button) {
report.sThumbRY = 0;
break;
}
break;
case RIGHT_AUX:
switch(button) {
case R_SHOULDER:
Expand All @@ -367,7 +368,7 @@ void process_button(JOYCON_REGION region, JOYCON_BUTTON button) {
// not implemented
break;
case R_STICK:
//right_buttons = right_buttons | XUSB_GAMEPAD_RIGHT_THUMB;
right_buttons = right_buttons | XUSB_GAMEPAD_RIGHT_THUMB;
break;
}
break;
Expand Down

0 comments on commit ce74f7d

Please sign in to comment.