Add Poll Type Behavior setting to Input Settings

This commit is contained in:
twinaphex 2016-01-27 01:51:09 +01:00
parent 11a82481c4
commit 326d5d319a
5 changed files with 29 additions and 0 deletions

View File

@ -756,6 +756,8 @@ static const bool input_descriptor_hide_unbound = false;
static const unsigned input_max_users = 5;
static const unsigned input_poll_type_behavior = 1;
#ifdef IOS
static const bool ui_companion_start_on_boot = false;
#else

View File

@ -700,6 +700,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "screen_resolution";
case MENU_LABEL_USE_BUILTIN_IMAGE_VIEWER:
return "use_builtin_image_viewer";
case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
return "input_poll_type_behavior";
default:
break;
}
@ -1648,6 +1650,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
return "Enable";
case MENU_LABEL_VALUE_START_CORE:
return "Start Core";
case MENU_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR:
return "Poll Type Behavior";
default:
break;
}

View File

@ -1777,6 +1777,8 @@ static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INPUT_REMAPPING_OPTIONS),
menu_hash_to_str(MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS),
MENU_SETTING_ACTION, 0, 0);
menu_entries_push(info->list,
menu_hash_to_str(MENU_LABEL_VALUE_CORE_CHEAT_OPTIONS),
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
@ -2678,6 +2680,8 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_INPUT_SMALL_KEYBOARD_ENABLE), PARSE_ONLY_BOOL, false);
#endif
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR), PARSE_ONLY_UINT, false);
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_INPUT_ICADE_ENABLE), PARSE_ONLY_BOOL, false);
ret = menu_displaylist_parse_settings(menu, info,

View File

@ -22,6 +22,9 @@
extern "C" {
#endif
#define MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR 0x8360107bU
#define MENU_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR 0xaa23fc1eU
#define MENU_LABEL_VALUE_SYSTEM_INFO_DYNAMIC_SUPPORT 0xe5f4b599U
#define MENU_LABEL_UI_COMPANION_ENABLE 0xb2d7a20cU

View File

@ -2791,6 +2791,9 @@ void general_write_handler(void *data)
switch (hash)
{
case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
core.poll_type = *setting->value.integer;
break;
case MENU_LABEL_VIDEO_SCALE_INTEGER:
{
video_viewport_t vp;
@ -5193,6 +5196,19 @@ static bool setting_append_list_input_options(
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, MAX_USERS, 1, true, true);
CONFIG_UINT(
list, list_info,
&settings->input.poll_type_behavior,
menu_hash_to_str(MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR),
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR),
input_poll_type_behavior,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
#if TARGET_OS_IPHONE
CONFIG_BOOL(
list, list_info,