From abe28425faba6c3c729886859be030d098a92df8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 15 Nov 2004 05:17:45 +0000 Subject: prepping for release, fixed a couple very minor bugs svn path=/trunk/externals/hcs/hid/; revision=2276 --- hid_darwin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hid_darwin.c') diff --git a/hid_darwin.c b/hid_darwin.c index b257b2f..8e904ea 100644 --- a/hid_darwin.c +++ b/hid_darwin.c @@ -51,8 +51,8 @@ #include "hid.h" -//#define DEBUG(x) -#define DEBUG(x) x +#define DEBUG(x) +//#define DEBUG(x) x /*============================================================================== * GLOBAL VARS @@ -115,7 +115,8 @@ void convertDarwinElementToLinuxTypeCode(pRecElement element, char *linux_type, break; case kHIDPage_Button: sprintf(linux_type, "key"); - sprintf(linux_code, "btn_%ld", element->usage); + /* HID Manager button numbers start at 1, [hid] start at 0 */ + sprintf(linux_code, "btn_%ld", element->usage - 1); break; } } @@ -173,7 +174,7 @@ t_int hid_build_element_list(t_hid *x) DEBUG(post("[hid] found %d elements:",numElements);); post(""); - post(" TYPE\t\tCODE\tEVENT NAME"); + post(" TYPE\tCODE\tEVENT NAME"); post("-----------------------------------------------------------"); for(i=0; i