Move input LUT table to input_driver.h

This commit is contained in:
libretroadmin 2023-01-05 19:30:51 +01:00
parent d36bd9e677
commit b59a13771c
3 changed files with 30 additions and 28 deletions

View File

@ -91,6 +91,34 @@
|| ((autoconf_bind)->joyaxis != AXIS_NONE)) \
)
/* Human readable order of input binds */
const unsigned input_config_bind_order[24] = {
RETRO_DEVICE_ID_JOYPAD_UP,
RETRO_DEVICE_ID_JOYPAD_DOWN,
RETRO_DEVICE_ID_JOYPAD_LEFT,
RETRO_DEVICE_ID_JOYPAD_RIGHT,
RETRO_DEVICE_ID_JOYPAD_A,
RETRO_DEVICE_ID_JOYPAD_B,
RETRO_DEVICE_ID_JOYPAD_X,
RETRO_DEVICE_ID_JOYPAD_Y,
RETRO_DEVICE_ID_JOYPAD_SELECT,
RETRO_DEVICE_ID_JOYPAD_START,
RETRO_DEVICE_ID_JOYPAD_L,
RETRO_DEVICE_ID_JOYPAD_R,
RETRO_DEVICE_ID_JOYPAD_L2,
RETRO_DEVICE_ID_JOYPAD_R2,
RETRO_DEVICE_ID_JOYPAD_L3,
RETRO_DEVICE_ID_JOYPAD_R3,
19, /* Left Analog Up */
18, /* Left Analog Down */
17, /* Left Analog Left */
16, /* Left Analog Right */
23, /* Right Analog Up */
22, /* Right Analog Down */
21, /* Right Analog Left */
20, /* Right Analog Right */
};
/**************************************/
/* TODO/FIXME - turn these into static global variable */
retro_keybind_set input_config_binds[MAX_USERS];

View File

@ -999,6 +999,8 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
void input_keyboard_event(bool down, unsigned code,
uint32_t character, uint16_t mod, unsigned device);
extern const unsigned input_config_bind_order[24];
extern input_device_driver_t *joypad_drivers[];
extern input_driver_t *input_drivers[];
#ifdef HAVE_HID

View File

@ -148,34 +148,6 @@ unsigned int retroarch_get_rotation(void);
void retroarch_init_task_queue(void);
/* Human readable order of input binds */
static const unsigned input_config_bind_order[] = {
RETRO_DEVICE_ID_JOYPAD_UP,
RETRO_DEVICE_ID_JOYPAD_DOWN,
RETRO_DEVICE_ID_JOYPAD_LEFT,
RETRO_DEVICE_ID_JOYPAD_RIGHT,
RETRO_DEVICE_ID_JOYPAD_A,
RETRO_DEVICE_ID_JOYPAD_B,
RETRO_DEVICE_ID_JOYPAD_X,
RETRO_DEVICE_ID_JOYPAD_Y,
RETRO_DEVICE_ID_JOYPAD_SELECT,
RETRO_DEVICE_ID_JOYPAD_START,
RETRO_DEVICE_ID_JOYPAD_L,
RETRO_DEVICE_ID_JOYPAD_R,
RETRO_DEVICE_ID_JOYPAD_L2,
RETRO_DEVICE_ID_JOYPAD_R2,
RETRO_DEVICE_ID_JOYPAD_L3,
RETRO_DEVICE_ID_JOYPAD_R3,
19, /* Left Analog Up */
18, /* Left Analog Down */
17, /* Left Analog Left */
16, /* Left Analog Right */
23, /* Right Analog Up */
22, /* Right Analog Down */
21, /* Right Analog Left */
20, /* Right Analog Right */
};
/* Creates folder and core options stub file for subsequent runs */
bool core_options_create_override(bool game_specific);
bool core_options_remove_override(bool game_specific);