mirror of
https://github.com/libretro/RetroArch
synced 2025-02-27 18:41:01 +00:00
Merge pull request #5172 from RobLoach/horizontalperf
Allow Toggling the XMB Horizontal Animation
This commit is contained in:
commit
ba31285160
@ -1181,6 +1181,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#endif
|
||||
SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false);
|
||||
SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, true, false);
|
||||
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false);
|
||||
SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, menu_dpi_override_enable, false);
|
||||
SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false);
|
||||
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, def_mouse_enable, false);
|
||||
|
@ -119,6 +119,7 @@ typedef struct settings
|
||||
bool menu_show_advanced_settings;
|
||||
bool menu_throttle_framerate;
|
||||
bool menu_linear_filter;
|
||||
bool menu_horizontal_animation;
|
||||
bool menu_show_online_updater;
|
||||
bool menu_show_core_updater;
|
||||
bool menu_xmb_shadows_enable;
|
||||
|
@ -860,6 +860,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Menu File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
"Horizontal Animation")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
|
||||
"Menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
|
||||
|
@ -581,6 +581,8 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
|
||||
"menu_file_browser_settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
|
||||
"menu_linear_filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION,
|
||||
"menu_horizontal_animation")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_SETTINGS,
|
||||
"menu_settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_WALLPAPER,
|
||||
|
@ -953,6 +953,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
"Horizontal Animation")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
|
||||
"Menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
|
||||
|
@ -1615,6 +1615,7 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
||||
int dir = -1;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (xmb->categories.selection_ptr > xmb->categories.selection_ptr_old)
|
||||
dir = 1;
|
||||
@ -1639,7 +1640,11 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
||||
|
||||
xmb_list_switch_old(xmb, xmb->selection_buf_old,
|
||||
dir, xmb->selection_ptr_old);
|
||||
|
||||
// Check if we are to have horizontal animations.
|
||||
if (settings->bools.menu_horizontal_animation) {
|
||||
xmb_list_switch_new(xmb, selection_buf, dir, selection);
|
||||
}
|
||||
xmb->categories.active.idx_old = (unsigned)xmb->categories.selection_ptr;
|
||||
|
||||
if (!string_is_equal(xmb_thumbnails_ident(),
|
||||
@ -3821,12 +3826,17 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
// Check whether to enable the horizontal animation.
|
||||
if (settings->bools.menu_horizontal_animation) {
|
||||
xmb_list_deep_copy(selection_buf, xmb->selection_buf_old);
|
||||
xmb_list_deep_copy(menu_stack, xmb->menu_stack_old);
|
||||
}
|
||||
|
||||
xmb->selection_ptr_old = selection;
|
||||
|
||||
list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL)
|
||||
|
@ -5114,6 +5114,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
@ -5075,6 +5075,22 @@ static bool setting_append_list(
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_horizontal_animation,
|
||||
MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
true,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
#ifdef RARCH_MOBILE
|
||||
/* We don't want mobile users being able to switch this off. */
|
||||
(*list)[list_info->index - 1].action_left = NULL;
|
||||
|
@ -670,6 +670,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(MOUSE_ENABLE),
|
||||
MENU_LABEL(POINTER_ENABLE),
|
||||
MENU_LABEL(MENU_LINEAR_FILTER),
|
||||
MENU_LABEL(MENU_HORIZONTAL_ANIMATION),
|
||||
MENU_LABEL(NAVIGATION_WRAPAROUND),
|
||||
MENU_LABEL(SHOW_ADVANCED_SETTINGS),
|
||||
MENU_LABEL(THREADED_DATA_RUNLOOP_ENABLE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user