(Apple) Build fixes

This commit is contained in:
Twinaphex 2015-01-19 05:05:41 +01:00
parent 824f00be15
commit da24b62de9
3 changed files with 9 additions and 5 deletions

View File

@ -172,7 +172,7 @@ static void hidpad_ps3_set_rumble(void *data,
if (!device)
return;
if ((device->motors[idx] == strength))
if (device->motors[idx] == strength)
return;
device->motors[idx] = strength;

View File

@ -35,6 +35,8 @@ static int wiimote_send(struct wiimote_t* wm,
int x = 2;
byte buf[32];
(void)x;
buf[0] = WM_SET_REPORT | WM_BT_OUTPUT;
buf[1] = report_type;
@ -197,6 +199,8 @@ static int wiimote_write_data(struct wiimote_t* wm,
int i = 0;
byte buf[21] = {0}; /* the payload is always 23 */
(void)i;
if (!wm || !WIIMOTE_IS_CONNECTED(wm))
return 0;
if (!data || !len)
@ -343,12 +347,12 @@ static int wiimote_handshake(struct wiimote_t* wm, byte event, byte* data,
* 0x00 to 0x(4)A400FB. (support clones) */
buf = 0x55;
wiimote_write_data(wm, 0x04A400F0, &buf, 1);
retro_sleep(100000);
usleep(100000);
buf = 0x00;
wiimote_write_data(wm, 0x04A400FB, &buf, 1);
/* check extension type! */
retro_sleep(100000);
usleep(100000);
wiimote_read_data(wm, WM_EXP_MEM_CALIBR+220, 4);
#if 0
wiimote_read_data(wm, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN);
@ -422,7 +426,7 @@ static int wiimote_handshake(struct wiimote_t* wm, byte event, byte* data,
}
else
{
retro_sleep(100000);
usleep(100000);
/* pedimos datos de calibracion del JOY! */
wiimote_read_data(wm, WM_EXP_MEM_CALIBR, 16);
wm->handshake_state = 5;

View File

@ -177,7 +177,7 @@ bool pad_connection_rumble(joypad_connection_t *s,
if (!s->iface)
return false;
if (!s->iface->set_rumble)
return;
return false;
s->iface->set_rumble(s->data, effect, strength);
return true;