diff options
Diffstat (limited to 'wiiremote/aka.wiiremote.c')
-rw-r--r-- | wiiremote/aka.wiiremote.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/wiiremote/aka.wiiremote.c b/wiiremote/aka.wiiremote.c index 6ad24d9..89e6248 100644 --- a/wiiremote/aka.wiiremote.c +++ b/wiiremote/aka.wiiremote.c @@ -115,9 +115,12 @@ void main() void akawiiremote_bang(t_akawiiremote *x) { t_atom list[4]; - - if (x->wiiremote->device == nil) + + if (x->wiiremote->device == nil) + { + post("warning: your WiiRemote is not connected"); return; // do nothing + } #ifdef PD outlet_float(x->buttonsOut, (t_float) x->wiiremote->buttonData); @@ -319,6 +322,8 @@ void *akawiiremote_new(t_symbol *s, short ac, t_atom *av) { #ifdef PD t_akawiiremote *x = (t_akawiiremote *)pd_new(wiiremote_class); + + x->wiiremote = wiiremote_init(); x->clock = clock_new(x, (t_method)akawiiremote_clock); |