aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-11-02 16:48:11 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-11-02 16:48:11 +0000
commit75b6a3976f58057930f54b0da524dead2007f1b1 (patch)
treede12100ef0221a5298f4be7fe550061e89f8dba3
parentf5527cb9a005164c5e51b2ee7ed63b9e0c733659 (diff)
output connection state when "status" is queried
svn path=/trunk/externals/hardware/wiimote/; revision=12718
-rw-r--r--wiimote.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/wiimote.c b/wiimote.c
index 15c390b..8f25d3e 100644
--- a/wiimote.c
+++ b/wiimote.c
@@ -788,11 +788,12 @@ static void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
static void wiimote_status(t_wiimote *x)
{
- if(x->connected) {
- if (cwiid_request_status(x->wiimote)) {
- pd_error(x, "error requesting status message");
- }
- }
+ if(x->connected) {
+ if (cwiid_request_status(x->wiimote)) {
+ pd_error(x, "error requesting status message");
+ }
+ }
+ wiimote_out_status(x, x->connected);
}