From 5b3ac4861336ee5c510d3e554fcf18acad691ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 7 May 2008 16:16:23 +0000 Subject: i don't claim that everything here is as it should be; but at least it compiles again... (and input seems to work; i have not been able to do the keyboard-led thing, however) svn path=/trunk/externals/io/hidio/; revision=9771 --- hidio_linux.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/hidio_linux.c b/hidio_linux.c index be632cf..72e57f4 100644 --- a/hidio_linux.c +++ b/hidio_linux.c @@ -72,7 +72,7 @@ t_symbol* hidio_convert_linux_buttons_to_numbers(__u16 linux_code) snprintf(hidio_code, MAXPDSTRING,"btn_%d",linux_code - BTN_WHEEL); else return 0; } - return gensym(hidio_code ? hidio_code : "?"); + return gensym(*hidio_code ? hidio_code : "?"); } /* Georg Holzmann: implementation of the keys */ @@ -274,7 +274,7 @@ void hidio_print_device_list(void) for(i=0;i<128;++i) { snprintf(dev_handle_name, MAXPDSTRING, "/dev/input/event%d", i); - if(dev_handle_name) + if(*dev_handle_name) { /* open the device read-only, non-exclusive */ fd = open (dev_handle_name, O_RDONLY | O_NONBLOCK); @@ -451,7 +451,7 @@ t_int hidio_open_device(t_hidio *x, short device_number) x->x_device_number = device_number; snprintf(block_device,MAXPDSTRING,"/dev/input/event%d",x->x_device_number); - if(block_device) + if(*block_device) { /* open the device read-only, non-exclusive */ // x->x_fd = open(block_device, O_RDONLY | O_NONBLOCK); @@ -589,8 +589,24 @@ short get_device_number_from_usage(short device_number, return -1; } +void hidio_write_event_symbol_int(t_hidio *x, t_symbol *type, t_int code, + t_int instance, t_int value) +{ + debug_post(LOG_DEBUG,"hidio_write_event_symbol_int"); +} +void hidio_write_event_symbols(t_hidio *x, t_symbol *type, t_symbol *code, + t_int instance, t_int value) +{ + debug_post(LOG_DEBUG,"hidio_write_event_symbols"); +} + +void hidio_write_event_ints(t_hidio *x, t_int type, t_int code, + t_int instance, t_int value) +{ + debug_post(LOG_DEBUG,"hidio_write_event_ints"); +} -void hidio_write_event(t_hidio *x, t_symbol *type, t_symbol *code, +void hidio_write_event_JMZ(t_hidio *x, t_symbol *type, t_symbol *code, t_float instance, t_float value) { struct input_event write_event; -- cgit v1.2.1