From 1a74eae3dbdd38003446d963b829c5fe5e8cd274 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 11 Jun 2005 05:01:14 +0000 Subject: added barebones ff function to linux file so that it'll work svn path=/trunk/externals/hcs/hid/; revision=3166 --- hid_linux.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) (limited to 'hid_linux.c') diff --git a/hid_linux.c b/hid_linux.c index 92b589c..8134b78 100644 --- a/hid_linux.c +++ b/hid_linux.c @@ -257,6 +257,67 @@ void hid_print_device_list(void) post(""); } +/* ------------------------------------------------------------------------------ */ +/* FORCE FEEDBACK FUNCTIONS */ +/* ------------------------------------------------------------------------------ */ + +/* cross-platform force feedback functions */ +t_int hid_ff_autocenter( t_hid *x, t_float value ) +{ + return ( 0 ); +} + + +t_int hid_ff_gain( t_hid *x, t_float value ) +{ + return ( 0 ); +} + + +t_int hid_ff_motors( t_hid *x, t_float value ) +{ + return ( 0 ); +} + + +t_int hid_ff_continue( t_hid *x ) +{ + return ( 0 ); +} + + +t_int hid_ff_pause( t_hid *x ) +{ + return ( 0 ); +} + + +t_int hid_ff_reset( t_hid *x ) +{ + return ( 0 ); +} + + +t_int hid_ff_stopall( t_hid *x ) +{ + return ( 0 ); +} + + + +// these are just for testing... +t_int hid_ff_fftest ( t_hid *x, t_float value) +{ + return ( 0 ); +} + + +void hid_ff_print( t_hid *x ) +{ +} + + + /* ------------------------------------------------------------------------------ */ /* Pd [hid] FUNCTIONS */ /* ------------------------------------------------------------------------------ */ @@ -287,10 +348,14 @@ t_int hid_get_events(t_hid *x) hid_convert_linux_buttons_to_numbers(hid_input_event.code,hid_code); hid_convert_linux_keys(hid_input_event.code,hid_code); } - else + else if (event_names[hid_input_event.type][hid_input_event.code] != NULL) { strcpy(hid_code, event_names[hid_input_event.type][hid_input_event.code]); } + else + { + strcpy(hid_code, "unknown"); + } hid_output_event(x, ev[hid_input_event.type], hid_code, (t_float)hid_input_event.value); -- cgit v1.2.1