mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Add CONFIG_BIND_ALT
This commit is contained in:
parent
1bc2ea417c
commit
b9909bf5ba
@ -63,7 +63,9 @@ static int16_t wiiu_input_state(void *data, const struct retro_keybind **binds,
|
||||
return input_joypad_pressed(wiiu->joypad, port, binds[port], id);
|
||||
break;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
return input_joypad_analog(wiiu->joypad, port, idx, id, binds[port]);
|
||||
if (binds[port])
|
||||
return input_joypad_analog(wiiu->joypad, port, idx, id, binds[port]);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2030,7 +2030,7 @@ static bool setting_append_list_input_player_options(
|
||||
|
||||
snprintf(name, sizeof(name), "p%u_%s", user + 1, input_config_bind_map_get_base(i));
|
||||
|
||||
CONFIG_BIND(
|
||||
CONFIG_BIND_ALT(
|
||||
list, list_info,
|
||||
&settings->input.binds[user][i],
|
||||
user + 1,
|
||||
@ -4267,7 +4267,7 @@ static bool setting_append_list(
|
||||
if (!input_config_bind_map_get_meta(i))
|
||||
continue;
|
||||
|
||||
CONFIG_BIND(
|
||||
CONFIG_BIND_ALT(
|
||||
list, list_info,
|
||||
&settings->input.binds[0][i], 0, 0,
|
||||
strdup(input_config_bind_map_get_base(i)),
|
||||
|
@ -1819,6 +1819,33 @@ bool CONFIG_BIND(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CONFIG_BIND_ALT(
|
||||
rarch_setting_t **list,
|
||||
rarch_setting_info_t *list_info,
|
||||
struct retro_keybind *target,
|
||||
uint32_t player, uint32_t player_offset,
|
||||
const char *name, const char *SHORT,
|
||||
const struct retro_keybind *default_value,
|
||||
rarch_setting_group_info_t *group_info,
|
||||
rarch_setting_group_info_t *subgroup_info,
|
||||
const char *parent_group)
|
||||
{
|
||||
rarch_setting_t value = setting_bind_setting(name, SHORT, target,
|
||||
player, player_offset, default_value,
|
||||
group_info->name, subgroup_info->name, parent_group,
|
||||
true);
|
||||
if (!(settings_list_append(list, list_info)))
|
||||
return false;
|
||||
|
||||
if (value.name)
|
||||
value.name_hash = msg_hash_calculate(value.name);
|
||||
(*list)[list_info->index++] = value;
|
||||
/* Request name and short description to be freed later */
|
||||
settings_data_list_current_add_free_flags(list, list_info, SD_FREE_FLAG_NAME | SD_FREE_FLAG_SHORT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CONFIG_ACTION_ALT(
|
||||
rarch_setting_t **list,
|
||||
rarch_setting_info_t *list_info,
|
||||
|
@ -374,6 +374,17 @@ bool CONFIG_BIND(
|
||||
rarch_setting_group_info_t *subgroup_info,
|
||||
const char *parent_group);
|
||||
|
||||
bool CONFIG_BIND_ALT(
|
||||
rarch_setting_t **list,
|
||||
rarch_setting_info_t *list_info,
|
||||
struct retro_keybind *target,
|
||||
uint32_t player, uint32_t player_offset,
|
||||
const char *name, const char *SHORT,
|
||||
const struct retro_keybind *default_value,
|
||||
rarch_setting_group_info_t *group_info,
|
||||
rarch_setting_group_info_t *subgroup_info,
|
||||
const char *parent_group);
|
||||
|
||||
/**
|
||||
* setting_set_with_string_representation:
|
||||
* @setting : pointer to setting
|
||||
|
Loading…
x
Reference in New Issue
Block a user