mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Renamed new settings to match change & cleaned code
This commit is contained in:
parent
ade4e7857b
commit
a64e497189
@ -238,11 +238,11 @@ static void psp_joypad_poll(void)
|
||||
if (psp2_model == SCE_KERNEL_MODEL_VITA
|
||||
&& !menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)
|
||||
&& settings->input.backtouch_enable) {
|
||||
SceTouchData back = {0};
|
||||
sceTouchPeek(settings->input.backtouch_toggle ? SCE_TOUCH_PORT_FRONT : SCE_TOUCH_PORT_BACK, &back, 1);
|
||||
for (int i = 0; i < back.reportNum; i++) {
|
||||
int x = LERP(back.report[i].x, TOUCH_MAX_WIDTH, SCREEN_WIDTH);
|
||||
int y = LERP(back.report[i].y, TOUCH_MAX_HEIGHT, SCREEN_HEIGHT);
|
||||
SceTouchData touch_surface = {0};
|
||||
sceTouchPeek(settings->input.backtouch_toggle ? SCE_TOUCH_PORT_FRONT : SCE_TOUCH_PORT_BACK, &touch_surface, 1);
|
||||
for (int i = 0; i < touch_surface.reportNum; i++) {
|
||||
int x = LERP(touch_surface.report[i].x, TOUCH_MAX_WIDTH, SCREEN_WIDTH);
|
||||
int y = LERP(touch_surface.report[i].y, TOUCH_MAX_HEIGHT, SCREEN_HEIGHT);
|
||||
if (NW_AREA(x, y)) state_tmp.buttons |= PSP_CTRL_L2;
|
||||
if (NE_AREA(x, y)) state_tmp.buttons |= PSP_CTRL_R2;
|
||||
if (SW_AREA(x, y)) state_tmp.buttons |= PSP_CTRL_L3;
|
||||
|
@ -1508,11 +1508,11 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Numbers are described in frames."
|
||||
);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE:
|
||||
snprintf(s, len, "Enable back touch support");
|
||||
case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE:
|
||||
snprintf(s, len, "Enable touch support");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE:
|
||||
snprintf(s, len, "Switch back with front touch");
|
||||
case MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH:
|
||||
snprintf(s, len, "Use front instead of back touch");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MOUSE_ENABLE:
|
||||
snprintf(s, len, "Enable mouse input inside the menu.");
|
||||
@ -2042,10 +2042,10 @@ static const char *menu_hash_to_str_jp_label_enum(enum msg_hash_enums msg)
|
||||
return "cheevos_test_unofficial";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENABLE:
|
||||
return "cheevos_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE:
|
||||
return "input_backtouch_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE:
|
||||
return "input_backtouch_toggle";
|
||||
case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE:
|
||||
return "input_touch_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH:
|
||||
return "input_prefer_front_touch";
|
||||
case MENU_ENUM_LABEL_INPUT_ICADE_ENABLE:
|
||||
return "input_icade_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE:
|
||||
|
@ -2098,10 +2098,10 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "cheevos_test_unofficial";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENABLE:
|
||||
return "cheevos_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE:
|
||||
return "input_backtouch_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE:
|
||||
return "input_backtouch_toggle";
|
||||
case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE:
|
||||
return "input_touch_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH:
|
||||
return "input_prefer_front_touch";
|
||||
case MENU_ENUM_LABEL_INPUT_ICADE_ENABLE:
|
||||
return "input_icade_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE:
|
||||
|
@ -2041,8 +2041,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "cheëvòs_tëst_ünõffìçial";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENABLE:
|
||||
return "çheévós_enable";
|
||||
case MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE:
|
||||
return "iñput_bâçktõüçh_ènable";
|
||||
case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE:
|
||||
return "iñput_tõüçh_ènable";
|
||||
case MENU_ENUM_LABEL_VALUE_INPUT_BACKTOUCH_TOGGLE_ENABLE:
|
||||
return "iñput_bâçktõüçh_toggle";
|
||||
case MENU_ENUM_LABEL_INPUT_ICADE_ENABLE:
|
||||
|
@ -5230,10 +5230,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
#endif
|
||||
#ifdef VITA
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
#endif
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
|
@ -4095,7 +4095,7 @@ static bool setting_append_list(
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->input.backtouch_enable,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_BACKTOUCH_ENABLE),
|
||||
input_backtouch_enable,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF),
|
||||
@ -4107,12 +4107,12 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->input.backtouch_toggle,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_BACKTOUCH_TOGGLE_ENABLE),
|
||||
input_backtouch_toggle,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF),
|
||||
@ -4124,7 +4124,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH);
|
||||
#endif
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
@ -434,8 +434,8 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD,
|
||||
MENU_ENUM_LABEL_INPUT_SMALL_KEYBOARD_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_BACKTOUCH_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_BACKTOUCH_TOGGLE_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH,
|
||||
MENU_ENUM_LABEL_INPUT_ICADE_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_USER_1_BINDS,
|
||||
MENU_ENUM_LABEL_INPUT_USER_2_BINDS,
|
||||
|
Loading…
Reference in New Issue
Block a user