diff --git a/source/input.cpp b/source/input.cpp index 9a439dd..0462877 100644 --- a/source/input.cpp +++ b/source/input.cpp @@ -906,15 +906,22 @@ static u32 DecodeJoy(unsigned short pad) } else if(wpad_exp_type == WPAD_EXP_CLASSIC) { // classic controller - - for (u32 i =0; i < MAXJP; ++i) - { - if ((pad_btns_h & btnmap[CTRLR_GCPAD][i]) // gamecube controller - || ( wiidrcp_btns_h & btnmap[CTRLR_WIIDRC][i] ) //wiiu gamepad - || ( (wpad_btns_h & btnmap[CTRLR_CLASSIC][i]) )) - J |= vbapadmap[i]; + if (wp->exp.classic.type == 2) { + for (u32 i = 0; i < MAXJP; ++i) + { + if (wpad_btns_h & btnmap[CTRLR_WUPC][i] ) + J |= vbapadmap[i]; + } + } + else { + for (u32 i = 0; i < MAXJP; ++i) + { + if ((pad_btns_h & btnmap[CTRLR_GCPAD][i]) // gamecube controller + || ( wiidrcp_btns_h & btnmap[CTRLR_WIIDRC][i] ) //wiiu gamepad + || ( (wpad_btns_h & btnmap[CTRLR_CLASSIC][i]) )) + J |= vbapadmap[i]; + } } - } else if(wpad_exp_type == WPAD_EXP_NUNCHUK) { // nunchuk + wiimote