aboutsummaryrefslogtreecommitdiff
path: root/hid_darwin.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-11-15 05:17:45 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-11-15 05:17:45 +0000
commitabe28425faba6c3c729886859be030d098a92df8 (patch)
tree37a10b6a3a2b1fe9b179fa8a7a3363202f2e4f64 /hid_darwin.c
parent742e122ef16d2538803a3d40596ca9bd4b3f2112 (diff)
prepping for release, fixed a couple very minor bugs
svn path=/trunk/externals/hcs/hid/; revision=2276
Diffstat (limited to 'hid_darwin.c')
-rw-r--r--hid_darwin.c9
1 files changed, 5 insertions, 4 deletions
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<numElements; i++)
{