mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
(RARCH_CONSOLE) Add second param to set_default_keybind_lut (port
is player no)
This commit is contained in:
parent
33c54d0906
commit
e0f4953de8
@ -119,9 +119,10 @@ static bool xenon360_key_pressed(void *data, int key)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void xenon360_input_set_default_keybind_lut(unsigned device)
|
||||
static void xenon360_input_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device;
|
||||
(void)port;
|
||||
}
|
||||
|
||||
static void xenon360_input_set_analog_dpad_mapping(unsigned device, unsigned map_dpad_enum, unsigned controller_id)
|
||||
|
@ -206,9 +206,10 @@ static bool xinput_input_key_pressed(void *data, int key)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void xinput_set_default_keybind_lut(unsigned device)
|
||||
static void xinput_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device;
|
||||
(void)port;
|
||||
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[XDK_DEVICE_ID_JOYPAD_A].joykey;
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[XDK_DEVICE_ID_JOYPAD_X].joykey;
|
||||
|
@ -138,10 +138,11 @@ void rarch_input_set_default_keybinds(unsigned player)
|
||||
|
||||
void rarch_input_set_controls_default (const input_driver_t *input)
|
||||
{
|
||||
input->set_default_keybind_lut(STUB_DEVICE);
|
||||
|
||||
for(uint32_t x = 0; x < MAX_PLAYERS; x++)
|
||||
{
|
||||
input->set_default_keybind_lut(STUB_DEVICE, x);
|
||||
rarch_input_set_default_keybinds(x);
|
||||
}
|
||||
}
|
||||
|
||||
const char *rarch_input_get_default_keybind_name(unsigned id)
|
||||
|
2
driver.h
2
driver.h
@ -160,7 +160,7 @@ typedef struct input_driver
|
||||
bool (*key_pressed)(void *data, int key);
|
||||
void (*free)(void *data);
|
||||
#ifdef RARCH_CONSOLE
|
||||
void (*set_default_keybind_lut)(unsigned device);
|
||||
void (*set_default_keybind_lut)(unsigned device, unsigned port);
|
||||
void (*set_analog_dpad_mapping)(unsigned device, unsigned map_dpad_enum, unsigned controller_id);
|
||||
void (*post_init)(void);
|
||||
unsigned max_pads;
|
||||
|
@ -52,9 +52,10 @@ static void null_input_free(void *data)
|
||||
}
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
static void null_set_default_keybind_lut(unsigned device)
|
||||
static void null_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device;
|
||||
(void)port;
|
||||
}
|
||||
|
||||
static void null_set_analog_dpad_mapping(unsigned device, unsigned map_dpad_enum, unsigned controller_id)
|
||||
|
@ -478,9 +478,10 @@ static bool ps3_key_pressed(void *data, int key)
|
||||
}
|
||||
}
|
||||
|
||||
static void ps3_set_default_keybind_lut(unsigned device)
|
||||
static void ps3_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device;
|
||||
(void)port;
|
||||
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[PS3_DEVICE_ID_JOYPAD_CROSS].joykey;
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[PS3_DEVICE_ID_JOYPAD_SQUARE].joykey;
|
||||
|
@ -435,9 +435,11 @@ static bool wii_key_pressed(void *data, int key)
|
||||
}
|
||||
}
|
||||
|
||||
static void wii_set_default_keybind_lut(unsigned device)
|
||||
static void wii_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device; //TODO: Remove when you start using it in this function
|
||||
(void)port;
|
||||
|
||||
#if defined(CLASSIC_PAD)
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[WII_DEVICE_CLASSIC_ID_JOYPAD_B].joykey;
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[WII_DEVICE_CLASSIC_ID_JOYPAD_Y].joykey;
|
||||
|
@ -164,9 +164,10 @@ static void xinput_input_free_input(void *data)
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void xinput_set_default_keybind_lut(unsigned device)
|
||||
static void xinput_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
{
|
||||
(void)device;
|
||||
(void)port;
|
||||
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[XDK_DEVICE_ID_JOYPAD_A].joykey;
|
||||
rarch_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[XDK_DEVICE_ID_JOYPAD_X].joykey;
|
||||
|
Loading…
Reference in New Issue
Block a user