From 0ffbcb755916398d7127d1318aeac3863a7ea00e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 8 Sep 2008 17:24:19 +0000 Subject: - fixed "open" state reporting, it was always reporting "open 1" - cleaned up hidio-help.pd a bit, removed deprecated [print( message svn path=/trunk/externals/io/hidio/; revision=10278 --- hidio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hidio.c') diff --git a/hidio.c b/hidio.c index 941d492..10b4384 100644 --- a/hidio.c +++ b/hidio.c @@ -435,11 +435,10 @@ static void hidio_close(t_hidio *x) /* just to be safe, stop it first */ hidio_stop_poll(x); - if(! hidio_close_device(x)) - { - debug_post(LOG_INFO,"[hidio] closed device %d",x->x_device_number); - x->x_device_open = 0; - } + if(hidio_close_device(x) != 0) + debug_error(x, LOG_ERR,"[hidio] error closing device %d",x->x_device_number); + debug_post(LOG_DEBUG,"[hidio] closed device %d",x->x_device_number); + x->x_device_open = 0; output_open_status(x); } @@ -565,6 +564,7 @@ static void hidio_int(t_hidio* x, long l) static void hidio_debug(t_hidio *x, t_float f) { + debug_post(LOG_INFO,"[hidio] set global debug level to %d", (int)f); global_debug_level = f; } -- cgit v1.2.1