comparison controller_info.h @ 1599:1fc61c844ec5

Allow selecting controller type when controllers have an SDL 2 mapping, but heuristics fail to idenify details
author Michael Pavone <pavone@retrodev.com>
date Fri, 27 Jul 2018 22:40:56 -0700
parents 437e80a700aa
children 7f39c40b4b25
comparison
equal deleted inserted replaced
1598:5e2af89c3467 1599:1fc61c844ec5
20 SUBTYPE_PS3, 20 SUBTYPE_PS3,
21 SUBTYPE_PS4, 21 SUBTYPE_PS4,
22 SUBTYPE_WIIU, 22 SUBTYPE_WIIU,
23 SUBTYPE_SWITCH, 23 SUBTYPE_SWITCH,
24 SUBTYPE_GENESIS, 24 SUBTYPE_GENESIS,
25 SUBTYPE_SATURN 25 SUBTYPE_SATURN,
26 SUBTYPE_NUM
26 }; 27 };
27 28
28 enum { 29 enum {
29 VARIANT_NORMAL, 30 VARIANT_NORMAL,
30 VARIANT_6B_BUMPERS, //C and Z positions are RB and LB respectively 31 VARIANT_6B_BUMPERS, //C and Z positions are RB and LB respectively
31 VARIANT_6B_RIGHT //C and Z positions are RT and RB respectively 32 VARIANT_6B_RIGHT, //C and Z positions are RT and RB respectively
33 VARIANT_NUM
32 }; 34 };
33 35
34 typedef struct { 36 typedef struct {
35 char const *name; 37 char const *name;
36 uint8_t type; 38 uint8_t type;
39 } controller_info; 41 } controller_info;
40 42
41 controller_info get_controller_info(int index); 43 controller_info get_controller_info(int index);
42 const char *get_button_label(controller_info *info, int button); 44 const char *get_button_label(controller_info *info, int button);
43 const char *get_axis_label(controller_info *info, int axis); 45 const char *get_axis_label(controller_info *info, int axis);
46 void save_controller_info(int joystick, controller_info *info);
44 47
45 #endif //CONTROLLER_INFO_H_ 48 #endif //CONTROLLER_INFO_H_