1 #ifndef __RETRO_INPUT__
2 #define __RETRO_INPUT__
3 
4 struct KeyBind
5 {
6 	unsigned id;
7 	unsigned port;
8 	unsigned device;
9 	int index;
10 	unsigned position;
KeyBindKeyBind11 	KeyBind()
12 	{
13 		device = RETRO_DEVICE_NONE;
14 	}
15 };
16 
17 struct AxiBind
18 {
19 	unsigned id;
20 	int index;
AxiBindAxiBind21 	AxiBind()
22 	{
23 		index = -1;
24 	}
25 };
26 
27 #define MAX_PLAYERS         6                // highest number of supported players is 6 for xmen6p and a few other games
28 #define MAX_AXISES          6                // libretro supports 6 analog axises (2 analog button + 2 analog sticks), 4 would probably be sufficient for FBNeo though
29 #define MAX_KEYBINDS        255              // max number of inputs/macros we can assign
30 #define SWITCH_NCODE_RESET  (MAX_KEYBINDS+1) // fixed switch ncode for reset button
31 #define SWITCH_NCODE_DIAG   (MAX_KEYBINDS+2) // fixed switch ncode for diag button
32 
33 #define RETROPAD_CLASSIC	RETRO_DEVICE_ANALOG
34 #define RETROPAD_MODERN		RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 1)
35 #define RETROMOUSE_BALL		RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 2)
36 #define RETROMOUSE_FULL		RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_MOUSE, 1)
37 
38 #define GIT_SPECIAL_SWITCH	(0x03)
39 #define GIT_DIRECT_COORD	(0x11)
40 
41 #define JOY_NEG 0
42 #define JOY_POS 1
43 
44 #define RETRO_DEVICE_ID_JOYPAD_EMPTY 255
45 
46 #define PGI_UP       0
47 #define PGI_DOWN     1
48 #define PGI_LEFT     2
49 #define PGI_RIGHT    3
50 #define PGI_ANALOG_X 4
51 #define PGI_ANALOG_Y 5
52 
53 void SetDiagInpHoldFrameDelay(unsigned val);
54 void RefreshLightgunCrosshair();
55 void InputMake(void);
56 void InputInit();
57 void InputExit();
58 void SetDefaultDeviceTypes();
59 void SetControllerInfo();
60 
61 #endif
62