From 713456b563a86c43ce328ab756748a281d52e3ea Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 28 Jun 2012 16:23:10 -0500 Subject: [PATCH] In expansion handshake, read data after saying we'd like it. --- src/events.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/events.c b/src/events.c index ba6cc3a..2820ec1 100644 --- a/src/events.c +++ b/src/events.c @@ -791,10 +791,9 @@ void handshake_expansion(struct wiimote_t* wm, byte* data, uint16_t len) { if (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_EXP)) disable_expansion(wm); handshake_buf = malloc(EXP_HANDSHAKE_LEN * sizeof(byte)); - wiiuse_read_data_cb(wm, handshake_expansion, handshake_buf, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN); - /* tell the wiimote to send expansion data */ WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_EXP); + wiiuse_read_data_cb(wm, handshake_expansion, handshake_buf, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN); break; case 3: if(!data || !len) {