fixed controller mapping Reset button bug

This commit is contained in:
dborth 2009-07-01 17:16:27 +00:00
parent babac6448a
commit 5aa1e79d75
2 changed files with 7 additions and 7 deletions

View File

@ -66,7 +66,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
nespadmap[i++] = 0; // insert coin for VS games, insert/eject/select disk for FDS
/*** Gamecube controller Padmap ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_GCPAD))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_GCPAD))
{
i=0;
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
@ -83,7 +83,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
}
/*** Wiimote Padmap ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_WIIMOTE))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_WIIMOTE))
{
i=0;
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_1;
@ -100,7 +100,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
}
/*** Classic Controller Padmap ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_CLASSIC))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_CLASSIC))
{
i=0;
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_Y;
@ -117,7 +117,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
}
/*** Nunchuk + wiimote Padmap ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_NUNCHUK))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_NUNCHUK))
{
i=0;
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_NUNCHUK_BUTTON_C;
@ -134,7 +134,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
}
/*** Zapper : GC controller button mapping ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_ZAPPER && wiiCtrl == CTRLR_GCPAD))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_ZAPPER && wiiCtrl == CTRLR_GCPAD))
{
i=0;
btnmap[CTRL_ZAPPER][CTRLR_GCPAD][i++] = PAD_BUTTON_A; // shoot
@ -142,7 +142,7 @@ void ResetControls(int consoleCtrl, int wiiCtrl)
}
/*** Zapper : wiimote button mapping ***/
if(consoleCtrl == 0 || (consoleCtrl == CTRL_ZAPPER && wiiCtrl == CTRLR_WIIMOTE))
if(consoleCtrl == -1 || (consoleCtrl == CTRL_ZAPPER && wiiCtrl == CTRLR_WIIMOTE))
{
i=0;
btnmap[CTRL_ZAPPER][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B; // shoot

View File

@ -25,7 +25,7 @@ extern int rumbleRequest[4];
extern u32 btnmap[2][4][12];
void SetControllers();
void ResetControls(int cc = 0, int wc = 0);
void ResetControls(int cc = -1, int wc = -1);
void ShutoffRumble();
void DoRumble(int i);
s8 WPAD_StickX(u8 chan,u8 right);