diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-12-17 16:56:21 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:08:25 +0200 |
commit | 9a6afb879b41110e8ae58cdb2898a6c3a6e3ad3f (patch) | |
tree | 448c010ff80899152faf7e42fc96a0a06ddcd930 /wiiremote/aka.wiiremote.c | |
parent | 110c6fbdaac1a56dddb6c978eb7a89c195758286 (diff) |
fixed crasher, I forgot to include init in the Pd end of things
svn path=/trunk/externals/io/; revision=6928
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); |