mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
remap-redux part 2: only add items for devices set to RETRO_DEVICE_KEYBOARD (or a subclass)
This commit is contained in:
parent
daf262da96
commit
f6ee035011
@ -263,7 +263,6 @@ void input_remapping_set_defaults(bool deinit)
|
||||
if (keybind)
|
||||
settings->uints.input_remap_ids[i][j] = keybind->id;
|
||||
settings->uints.input_keymapper_ids[i][j] = RETROK_UNKNOWN;
|
||||
|
||||
}
|
||||
for (j = 0; j < 4; j++)
|
||||
settings->uints.input_remap_ids[i][RARCH_FIRST_CUSTOM_BIND + j] = j;
|
||||
|
@ -3274,39 +3274,42 @@ static int menu_displaylist_parse_options_remappings(
|
||||
if (system)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned device;
|
||||
|
||||
unsigned device = settings->uints.input_libretro_device[settings->uints.keymapper_port];
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
if (device == RETRO_DEVICE_KEYBOARD)
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
|
||||
device = settings->uints.input_libretro_device[i];
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
if (device == RETRO_DEVICE_KEYBOARD)
|
||||
{
|
||||
unsigned user = settings->uints.keymapper_port + 1;
|
||||
unsigned desc_offset = retro_id;
|
||||
char descriptor[255];
|
||||
const struct retro_keybind *auto_bind = NULL;
|
||||
const struct retro_keybind *keybind = NULL;
|
||||
|
||||
keybind = &input_config_binds[i][retro_id];
|
||||
auto_bind = (const struct retro_keybind*)
|
||||
input_config_get_bind_auto(i, retro_id);
|
||||
|
||||
input_config_get_bind_string(descriptor,
|
||||
keybind, auto_bind, sizeof(descriptor));
|
||||
|
||||
if(!strstr(descriptor, "Auto"))
|
||||
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
|
||||
{
|
||||
const struct retro_keybind *keyptr =
|
||||
&input_config_binds[i][retro_id];
|
||||
unsigned user = settings->uints.keymapper_port + 1;
|
||||
unsigned desc_offset = retro_id;
|
||||
char descriptor[255];
|
||||
const struct retro_keybind *auto_bind = NULL;
|
||||
const struct retro_keybind *keybind = NULL;
|
||||
|
||||
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||
keybind = &input_config_binds[i][retro_id];
|
||||
auto_bind = (const struct retro_keybind*)
|
||||
input_config_get_bind_auto(i, retro_id);
|
||||
|
||||
input_config_get_bind_string(descriptor,
|
||||
keybind, auto_bind, sizeof(descriptor));
|
||||
|
||||
if(!strstr(descriptor, "Auto"))
|
||||
{
|
||||
const struct retro_keybind *keyptr =
|
||||
&input_config_binds[i][retro_id];
|
||||
|
||||
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||
}
|
||||
|
||||
menu_entries_append_enum(info->list, descriptor, "",
|
||||
MSG_UNKNOWN,
|
||||
(MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + retro_id) * (i + 1), 0, 0);
|
||||
}
|
||||
|
||||
menu_entries_append_enum(info->list, descriptor, "",
|
||||
MSG_UNKNOWN,
|
||||
(MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + retro_id) * (i + 1), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user