diff --git a/src/events.c b/src/events.c index 81c3753..2d21492 100644 --- a/src/events.c +++ b/src/events.c @@ -194,7 +194,7 @@ int wiiuse_poll(struct wiimote_t** wm, int wiimotes) { int wiiuse_update(struct wiimote_t** wiimotes, int nwiimotes, wiiuse_update_cb callback) { int evnt = 0; if (wiiuse_poll(wiimotes, nwiimotes)) { - static struct WiimoteState_t s; + static struct wiimote_callback_data_t s; int i = 0; for (; i < nwiimotes; ++i) { switch (wiimotes[i]->event) { diff --git a/src/wiiuse.h b/src/wiiuse.h index 3b8ee8a..78bd8a8 100644 --- a/src/wiiuse.h +++ b/src/wiiuse.h @@ -689,7 +689,7 @@ typedef struct wiimote_t { } wiimote; /** @brief Data passed to a callback during wiiuse_update() */ -typedef struct WiimoteState_t { +typedef struct wiimote_callback_data_t { WCONST int uid; WCONST byte leds; WCONST float battery_level; @@ -703,10 +703,10 @@ typedef struct WiimoteState_t { WCONST WIIUSE_EVENT_TYPE event; WCONST int state; WCONST struct expansion_t expansion; -} WiimoteState; +} wiimote_callback_data_t; /** @brief Callback type */ -typedef void (*wiiuse_update_cb)(struct WiimoteState_t* wm); +typedef void (*wiiuse_update_cb)(struct wiimote_callback_data_t* wm); /** * @brief Loglevels supported by wiiuse.