diff --git a/src/io.c b/src/io.c index 9e8a749..82e9af7 100644 --- a/src/io.c +++ b/src/io.c @@ -205,7 +205,7 @@ void wiiuse_read_data_sync(struct wiimote_t *wm, byte memory, unsigned addr, uns * with this data. */ -#ifndef WIIUSE_SYNC_HANDSHAKE +#ifdef WIIUSE_SYNC_HANDSHAKE void wiiuse_handshake(struct wiimote_t* wm, byte* data, uint16_t len) { diff --git a/src/wiiuse.c b/src/wiiuse.c index b4b95db..839f0b6 100644 --- a/src/wiiuse.c +++ b/src/wiiuse.c @@ -181,7 +181,7 @@ void wiiuse_disconnected(struct wiimote_t* wm) { wm->leds = 0; wm->state = WIIMOTE_INIT_STATES; wm->read_req = NULL; -#ifdef WIIUSE_SYNC_HANDSHAKE +#ifndef WIIUSE_SYNC_HANDSHAKE wm->handshake_state = 0; #endif wm->btns = 0; @@ -763,7 +763,7 @@ void wiiuse_set_accel_threshold(struct wiimote_t* wm, int threshold) { void wiiuse_resync(struct wiimote_t* wm) { if (!wm) return; -#ifdef WIIUSE_SYNC_HANDSHAKE +#ifndef WIIUSE_SYNC_HANDSHAKE wm->handshake_state = 0; #endif wiiuse_handshake(wm, NULL, 0); diff --git a/src/wiiuse.h b/src/wiiuse.h index f801e3c..84affea 100644 --- a/src/wiiuse.h +++ b/src/wiiuse.h @@ -753,7 +753,7 @@ typedef struct wiimote_t { WCONST int flags; /**< options flag */ -#ifdef WIIUSE_SYNC_HANDSHAKE +#ifndef WIIUSE_SYNC_HANDSHAKE WCONST byte handshake_state; /**< the state of the connection handshake */ #endif WCONST byte expansion_state; /**< the state of the expansion handshake */