summaryrefslogtreecommitdiff
path: root/macosx/plugins/HIDInput/src/PlugPAD.h
blob: 514f6474ba21bf86e3bd2421c0bc8bca1059778a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#ifndef __PLUG_PAD_H__
#define __PLUG_PAD_H__

#include <IOKit/hid/IOHIDUsageTables.h>

#define MAX_NUM_PADS		2
#define MAX_NUM_KEYS		64
#define MAX_NUM_AXES		32

typedef struct {
    unsigned long button;
    unsigned char reverse;
    
    pRecDevice device;
    pRecElement element;
} keyEntry;

typedef struct {
    unsigned long axis;
    unsigned char reverse;
    unsigned char positive;
    unsigned char lastValue;
    
    pRecDevice device;
    pRecElement element;
} axisEntry;

extern int gControllerType[MAX_NUM_PADS];
extern int gNumKeys[MAX_NUM_PADS];
extern keyEntry gKeys[MAX_NUM_PADS][MAX_NUM_KEYS];
extern int gNumAxes[MAX_NUM_PADS];
extern axisEntry gAxes[MAX_NUM_PADS][MAX_NUM_AXES];

#endif //__PLUG_PAD_H__