aboutsummaryrefslogtreecommitdiff
path: root/hid_linux.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-06-11 05:01:14 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-06-11 05:01:14 +0000
commit1a74eae3dbdd38003446d963b829c5fe5e8cd274 (patch)
tree882ebea58a16163ec3e4b6e5dea8fbb74beb6251 /hid_linux.c
parentf632ec8b79a1620609b05bb0f765221b6fa60026 (diff)
added barebones ff function to linux file so that it'll work
svn path=/trunk/externals/hcs/hid/; revision=3166
Diffstat (limited to 'hid_linux.c')
-rw-r--r--hid_linux.c67
1 files changed, 66 insertions, 1 deletions
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);