(connect_wii.c) Dehardcode some magic numbers

This commit is contained in:
twinaphex 2015-04-03 02:56:37 +02:00
parent 7665226f4c
commit e7c7b55004
1 changed files with 15 additions and 12 deletions

View File

@ -95,6 +95,9 @@
#define EXP_NONE 0
#define EXP_CLASSIC 2
#define IDENT_NUNCHUK 0xA4200000
#define IDENT_CC 0xA4200101
typedef struct axis_t
{
bool has_center;
@ -554,21 +557,21 @@ static int wiimote_handshake(struct wiimote_t* wm,
#endif
/* EXP_ID_CODE_CLASSIC_CONTROLLER */
if(id != 0xa4200101)
switch (id)
{
case IDENT_CC:
rarch_sleep(100);
/* pedimos datos de calibracion del JOY! */
wiimote_read_data(wm, WM_EXP_MEM_CALIBR, 16);
wm->handshake_state = 5;
break;
default:
wm->handshake_state = 2;
#if 0
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_EXP);
#endif
continue;
}
else
{
rarch_sleep(100);
/* pedimos datos de calibracion del JOY! */
wiimote_read_data(wm, WM_EXP_MEM_CALIBR, 16);
wm->handshake_state = 5;
}
}
return 0;
case 5: