From 2e830fa6fa7d54c7d0900f11611ebe3d6171640f Mon Sep 17 00:00:00 2001 From: Lysann Schlegel Date: Mon, 12 Nov 2012 11:27:40 +0100 Subject: [PATCH] fix Windows compilation --- example/example.c | 3 ++- src/events.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/example/example.c b/example/example.c index 1db8bc5..f35f907 100644 --- a/example/example.c +++ b/example/example.c @@ -295,9 +295,10 @@ void test(struct wiimote_t* wm, byte* data, unsigned short len) { } short any_wiimote_connected(wiimote** wm, int wiimotes) { + int i; if(!wm) return 0; - for(int i = 0; i < wiimotes; i++) { + for(i = 0; i < wiimotes; i++) { if(wm[i] && WIIMOTE_IS_CONNECTED(wm[i])) return 1; } diff --git a/src/events.c b/src/events.c index d6d49ec..1d4d227 100644 --- a/src/events.c +++ b/src/events.c @@ -616,11 +616,11 @@ static void handle_expansion(struct wiimote_t* wm, byte* msg) { * a handshake with the expansion. */ void handshake_expansion(struct wiimote_t* wm, byte* data, uint16_t len) { - WIIUSE_DEBUG("handshake_expansion with state %d", wm->expansion_state); int id; byte val = 0; byte buf = 0x00; byte* handshake_buf; + WIIUSE_DEBUG("handshake_expansion with state %d", wm->expansion_state); switch(wm->expansion_state) { /* These two initialization writes disable the encryption */