mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Add back Bind Mode setting
This commit is contained in:
parent
640767ff24
commit
5b0132c16e
@ -607,6 +607,7 @@ static void config_set_defaults(void)
|
||||
settings->input.remap_binds_enable = true;
|
||||
settings->input.max_users = input_max_users;
|
||||
settings->input.menu_toggle_gamepad_combo = menu_toggle_gamepad_combo;
|
||||
settings->input.bind_mode = 0;
|
||||
|
||||
retro_assert(sizeof(settings->input.binds[0]) >= sizeof(retro_keybinds_1));
|
||||
retro_assert(sizeof(settings->input.binds[1]) >= sizeof(retro_keybinds_rest));
|
||||
@ -1637,6 +1638,8 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_PATH_BASE(conf, settings, content_history_path, "content_history_path");
|
||||
CONFIG_GET_INT_BASE(conf, settings, content_history_size, "content_history_size");
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.bind_mode, "input_bind_mode");
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.turbo_period, "input_turbo_period");
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.turbo_duty_cycle, "input_duty_cycle");
|
||||
|
||||
@ -2465,6 +2468,7 @@ bool config_save_file(const char *path)
|
||||
config_set_path(conf, "cheat_database_path", settings->cheat_database);
|
||||
config_set_path(conf, "cursor_directory", settings->cursor_directory);
|
||||
config_set_path(conf, "content_history_dir", settings->content_history_directory);
|
||||
config_set_int(conf, "input_bind_mode", settings->input.bind_mode);
|
||||
config_set_bool(conf, "rewind_enable", settings->rewind_enable);
|
||||
config_set_int(conf, "audio_latency", settings->audio.latency);
|
||||
config_set_bool(conf, "audio_sync", settings->audio.sync);
|
||||
|
@ -248,6 +248,7 @@ typedef struct settings
|
||||
|
||||
unsigned menu_toggle_gamepad_combo;
|
||||
bool back_as_menu_toggle_enable;
|
||||
unsigned bind_mode;
|
||||
} input;
|
||||
|
||||
struct
|
||||
|
@ -134,6 +134,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
return "system_bgm_enable";
|
||||
case MENU_LABEL_AUDIO_BLOCK_FRAMES:
|
||||
return "audio_block_frames";
|
||||
case MENU_LABEL_INPUT_BIND_MODE:
|
||||
return "input_bind_mode";
|
||||
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
|
||||
return "autoconfig_descriptor_label_show";
|
||||
case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:
|
||||
@ -814,6 +816,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
return "RetroKeyboard";
|
||||
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
|
||||
return "Block Frames";
|
||||
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
|
||||
return "Bind Mode";
|
||||
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
|
||||
return "Display Autoconfig Descriptor Labels";
|
||||
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
|
||||
|
@ -2560,6 +2560,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
menu_hash_to_str(MENU_LABEL_INPUT_TURBO_PERIOD), PARSE_ONLY_UINT, false);
|
||||
ret = menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_INPUT_DUTY_CYCLE), PARSE_ONLY_UINT, false);
|
||||
ret = menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_INPUT_BIND_MODE), PARSE_ONLY_UINT, false);
|
||||
ret = menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_INPUT_HOTKEY_BINDS), PARSE_ACTION, false);
|
||||
|
||||
|
@ -617,6 +617,9 @@ extern "C" {
|
||||
#define MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND 0x7051d870U
|
||||
#define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND 0xc26ddec5U
|
||||
|
||||
#define MENU_LABEL_INPUT_BIND_MODE 0x90281b55U
|
||||
#define MENU_LABEL_VALUE_INPUT_BIND_MODE 0xe06b25c7U
|
||||
|
||||
#define MENU_LABEL_NETWORK_CMD_ENABLE 0xfdf03a08U
|
||||
#define MENU_LABEL_VALUE_NETWORK_CMD_ENABLE 0xb822b7a1U
|
||||
#define MENU_LABEL_NETWORK_CMD_PORT 0xc1b9e0a6U
|
||||
|
@ -5006,6 +5006,7 @@ static bool setting_append_list_input_options(
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
|
||||
|
||||
@ -5056,6 +5057,18 @@ static bool setting_append_list_input_options(
|
||||
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_UINT(
|
||||
settings->input.bind_mode,
|
||||
menu_hash_to_str(MENU_LABEL_INPUT_BIND_MODE),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_BIND_MODE),
|
||||
0,
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
|
||||
START_SUB_GROUP(list, list_info, "Binds", group_info.name, subgroup_info, parent_group);
|
||||
|
Loading…
Reference in New Issue
Block a user