Mercurial > repos > blastem
comparison controller_info.h @ 1648:b7ecd0d6a77b mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 25 Dec 2018 11:12:26 -0800 |
parents | 84ef1eb2c96a |
children | 8a64d86cc362 |
comparison
equal
deleted
inserted
replaced
1509:36732f5c2281 | 1648:b7ecd0d6a77b |
---|---|
1 #ifndef CONTROLLER_INFO_H_ | |
2 #define CONTROLLER_INFO_H_ | |
3 #include <stdint.h> | |
4 | |
5 enum { | |
6 TYPE_UNKNOWN, | |
7 TYPE_GENERIC_MAPPING, | |
8 TYPE_XBOX, | |
9 TYPE_PSX, | |
10 TYPE_NINTENDO, | |
11 TYPE_SEGA | |
12 }; | |
13 | |
14 enum { | |
15 SUBTYPE_UNKNOWN, | |
16 SUBTYPE_XBOX, | |
17 SUBTYPE_X360, | |
18 SUBTYPE_XBONE, | |
19 SUBTYPE_PS2, | |
20 SUBTYPE_PS3, | |
21 SUBTYPE_PS4, | |
22 SUBTYPE_WIIU, | |
23 SUBTYPE_SWITCH, | |
24 SUBTYPE_GENESIS, | |
25 SUBTYPE_SATURN, | |
26 SUBTYPE_NUM | |
27 }; | |
28 | |
29 enum { | |
30 VARIANT_NORMAL, | |
31 VARIANT_6B_BUMPERS, //C and Z positions are RB and LB respectively | |
32 VARIANT_6B_RIGHT, //C and Z positions are RT and RB respectively | |
33 VARIANT_NUM | |
34 }; | |
35 | |
36 typedef struct { | |
37 char const *name; | |
38 uint8_t type; | |
39 uint8_t subtype; | |
40 uint8_t variant; | |
41 } controller_info; | |
42 | |
43 controller_info get_controller_info(int index); | |
44 const char *get_button_label(controller_info *info, int button); | |
45 const char *get_axis_label(controller_info *info, int axis); | |
46 void save_controller_info(int joystick, controller_info *info); | |
47 void save_controller_mapping(int joystick, char *mapping_string); | |
48 void controller_add_mappings(void); | |
49 char *make_controller_type_key(controller_info *info); | |
50 char *make_human_readable_type_name(controller_info *info); | |
51 | |
52 #endif //CONTROLLER_INFO_H_ |