mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 10:20:21 +00:00
(Menu) Refactor CUSTOM_VIEWPORT_2 enum
This commit is contained in:
parent
5aff93ab25
commit
3756afb3d8
@ -1529,7 +1529,7 @@ static int menu_viewport_iterate(unsigned action)
|
|||||||
|
|
||||||
case MENU_ACTION_CANCEL:
|
case MENU_ACTION_CANCEL:
|
||||||
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
||||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2)
|
if (!strcmp(label, "custom_viewport_2"))
|
||||||
{
|
{
|
||||||
file_list_push(driver.menu->menu_stack, "", "",
|
file_list_push(driver.menu->menu_stack, "", "",
|
||||||
MENU_SETTINGS_CUSTOM_VIEWPORT,
|
MENU_SETTINGS_CUSTOM_VIEWPORT,
|
||||||
@ -1542,9 +1542,8 @@ static int menu_viewport_iterate(unsigned action)
|
|||||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT
|
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT
|
||||||
&& !g_settings.video.scale_integer)
|
&& !g_settings.video.scale_integer)
|
||||||
{
|
{
|
||||||
file_list_push(driver.menu->menu_stack, "", "",
|
file_list_push(driver.menu->menu_stack, "",
|
||||||
MENU_SETTINGS_CUSTOM_VIEWPORT_2,
|
"custom_viewport_2", 0, driver.menu->selection_ptr);
|
||||||
driver.menu->selection_ptr);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1604,7 +1603,7 @@ static int menu_viewport_iterate(unsigned action)
|
|||||||
{
|
{
|
||||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT)
|
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT)
|
||||||
base_msg = "Set Upper-Left Corner";
|
base_msg = "Set Upper-Left Corner";
|
||||||
else if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2)
|
else if (!strcmp(label, "custom_viewport_2"))
|
||||||
base_msg = "Set Bottom-Right Corner";
|
base_msg = "Set Bottom-Right Corner";
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s (%d, %d : %4ux%4u)",
|
snprintf(msg, sizeof(msg), "%s (%d, %d : %4ux%4u)",
|
||||||
@ -2032,7 +2031,7 @@ static int menu_common_iterate(unsigned action)
|
|||||||
return menu_info_screen_iterate(action);
|
return menu_info_screen_iterate(action);
|
||||||
else if (menu_common_type_is(menu_type) == MENU_SETTINGS)
|
else if (menu_common_type_is(menu_type) == MENU_SETTINGS)
|
||||||
return menu_settings_iterate(action);
|
return menu_settings_iterate(action);
|
||||||
else if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2)
|
else if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || !strcmp(menu_label, "custom_viewport_2"))
|
||||||
return menu_viewport_iterate(action);
|
return menu_viewport_iterate(action);
|
||||||
else if (menu_type == MENU_SETTINGS_CUSTOM_BIND)
|
else if (menu_type == MENU_SETTINGS_CUSTOM_BIND)
|
||||||
return menu_custom_bind_iterate(driver.menu, action);
|
return menu_custom_bind_iterate(driver.menu, action);
|
||||||
|
@ -358,7 +358,7 @@ static void rgui_render(void)
|
|||||||
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS ||
|
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS ||
|
||||||
menu_type == MENU_SETTINGS_OPTIONS ||
|
menu_type == MENU_SETTINGS_OPTIONS ||
|
||||||
menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
||||||
menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2 ||
|
!strcmp(label, "custom_viewport_2") ||
|
||||||
!strcmp(label, "help") ||
|
!strcmp(label, "help") ||
|
||||||
menu_type == MENU_SETTINGS)
|
menu_type == MENU_SETTINGS)
|
||||||
snprintf(title, sizeof(title), "MENU %s", dir);
|
snprintf(title, sizeof(title), "MENU %s", dir);
|
||||||
|
@ -217,7 +217,8 @@ static void rmenu_render(void)
|
|||||||
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
|
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
|
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_OPTIONS) ||
|
(menu_type == MENU_SETTINGS_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2) ||
|
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
||||||
|
!strcmp(label, "custom_viewport_2")) ||
|
||||||
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
||||||
!strcmp(label, "help") ||
|
!strcmp(label, "help") ||
|
||||||
menu_type == MENU_SETTINGS)
|
menu_type == MENU_SETTINGS)
|
||||||
|
@ -452,7 +452,8 @@ static void rmenu_xui_render(void)
|
|||||||
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
|
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
|
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_OPTIONS) ||
|
(menu_type == MENU_SETTINGS_OPTIONS) ||
|
||||||
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2) ||
|
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
||||||
|
!strcmp(label, "custom_viewport_2")) ||
|
||||||
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
||||||
!strcmp(label, "help") ||
|
!strcmp(label, "help") ||
|
||||||
menu_type == MENU_SETTINGS)
|
menu_type == MENU_SETTINGS)
|
||||||
|
@ -87,7 +87,6 @@ typedef enum
|
|||||||
MENU_SETTINGS_VIDEO_OPTIONS,
|
MENU_SETTINGS_VIDEO_OPTIONS,
|
||||||
MENU_SETTINGS_VIDEO_RESOLUTION,
|
MENU_SETTINGS_VIDEO_RESOLUTION,
|
||||||
MENU_SETTINGS_CUSTOM_VIEWPORT,
|
MENU_SETTINGS_CUSTOM_VIEWPORT,
|
||||||
MENU_SETTINGS_CUSTOM_VIEWPORT_2,
|
|
||||||
MENU_SETTINGS_VIDEO_SOFTFILTER,
|
MENU_SETTINGS_VIDEO_SOFTFILTER,
|
||||||
MENU_SETTINGS_VIDEO_OPTIONS_LAST,
|
MENU_SETTINGS_VIDEO_OPTIONS_LAST,
|
||||||
MENU_SETTINGS_FONT_OPTIONS,
|
MENU_SETTINGS_FONT_OPTIONS,
|
||||||
|
Loading…
Reference in New Issue
Block a user