diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-06-11 05:01:14 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-06-11 05:01:14 +0000 |
commit | 1a74eae3dbdd38003446d963b829c5fe5e8cd274 (patch) | |
tree | 882ebea58a16163ec3e4b6e5dea8fbb74beb6251 | |
parent | f632ec8b79a1620609b05bb0f765221b6fa60026 (diff) |
added barebones ff function to linux file so that it'll work
svn path=/trunk/externals/hcs/hid/; revision=3166
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | hid_linux.c | 67 |
2 files changed, 74 insertions, 5 deletions
@@ -31,10 +31,14 @@ endif PDEXECUTABLE = ../../../pd/bin/pd # generic optimization -#OPT_FLAGS = -O3 -ffast-math -# G4 optimization -OPT_FLAGS = -O3 -mcpu=7400 -faltivec -ffast-math -fPIC -# faster G4 7450 optimization (gives errors) +OPT_FLAGS = -O3 -ffast-math +# G4 optimization on Mac OS X +#OPT_FLAGS = -O3 -mcpu=7400 -maltivec -ffast-math -fPIC +# faster G4 7450 optimization (gives errors) on GNU/Linux +#OPT_FLAGS = -O3 -mcpu=7450 -maltivec -ffast-math -fPIC +# G4 optimization on Mac OS X +#OPT_FLAGS = -O3 -mcpu=7400 -faltivec -ffast-math -fPIC +# faster G4 7450 optimization (gives errors) on Mac OS X #OPT_FLAGS = -ffast -mcpu=7450 -faltivec -ffast-math -fPIC CFLAGS = $(OPT_FLAGS) -Wall -W -Wno-shadow -Wstrict-prototypes -Wno-unused diff --git a/hid_linux.c b/hid_linux.c index 92b589c..8134b78 100644 --- a/hid_linux.c +++ b/hid_linux.c @@ -258,6 +258,67 @@ void hid_print_device_list(void) } /* ------------------------------------------------------------------------------ */ +/* 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); |