--- hatari/src/includes/joy.h 2019/04/01 07:14:46 1.1.1.5 +++ hatari/src/includes/joy.h 2019/04/09 08:50:25 1.1.1.8 @@ -10,10 +10,17 @@ typedef struct { - int XPos,YPos; /* -32768...0...32767 */ + int XPos,YPos; /* the actually read axis values in range of -32768...0...32767 */ + int XAxisID,YAxisID; /* the IDs of the physical PC joystick's axis to be used to gain ST joystick axis input */ int Buttons; /* JOY_BUTTON1 */ } JOYREADING; +typedef struct +{ + char SDLJoystickName[50]; + int XAxisID,YAxisID; /* the IDs associated with a certain SDL joystick */ +} JOYAXISMAPPING; + enum { JOYSTICK_SPACE_NULL, /* Not up/down */ @@ -36,6 +43,12 @@ enum #define JOYRANGE_LEFT_VALUE -16384 #define JOYRANGE_RIGHT_VALUE 16383 +#define ATARIJOY_BITMASK_UP 0x01 +#define ATARIJOY_BITMASK_DOWN 0x02 +#define ATARIJOY_BITMASK_LEFT 0x04 +#define ATARIJOY_BITMASK_RIGHT 0x08 +#define ATARIJOY_BITMASK_FIRE 0x80 + extern int JoystickSpaceBar; extern void Joy_Init(void);