diff --git a/input/connect/connect_ps3.c b/input/connect/connect_ps3.c index d7c076d608..304974fa70 100644 --- a/input/connect/connect_ps3.c +++ b/input/connect/connect_ps3.c @@ -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; diff --git a/input/connect/connect_wii.c b/input/connect/connect_wii.c index 40281b404e..8d5b5659c3 100644 --- a/input/connect/connect_wii.c +++ b/input/connect/connect_wii.c @@ -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; diff --git a/input/connect/joypad_connection.c b/input/connect/joypad_connection.c index cefced9d38..8898831d62 100644 --- a/input/connect/joypad_connection.c +++ b/input/connect/joypad_connection.c @@ -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;