mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Cleanups
This commit is contained in:
parent
826a5009b0
commit
b4733fd6c2
@ -71,7 +71,6 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
menu_handle_t *menu = (menu_handle_t*)data;
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
size_t selection = menu_navigation_get_selection();
|
|
||||||
|
|
||||||
menu_entries_get_last_stack(NULL, &label, &file_type, &enum_idx, NULL);
|
menu_entries_get_last_stack(NULL, &label, &file_type, &enum_idx, NULL);
|
||||||
|
|
||||||
@ -119,6 +118,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
|
|
||||||
if (menu_input_key_bind_iterate(&bind))
|
if (menu_input_key_bind_iterate(&bind))
|
||||||
{
|
{
|
||||||
|
size_t selection = menu_navigation_get_selection();
|
||||||
menu_entries_pop_stack(&selection, 0, 0);
|
menu_entries_pop_stack(&selection, 0, 0);
|
||||||
menu_navigation_set_selection(selection);
|
menu_navigation_set_selection(selection);
|
||||||
}
|
}
|
||||||
@ -129,6 +129,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
case ITERATE_TYPE_INFO:
|
case ITERATE_TYPE_INFO:
|
||||||
{
|
{
|
||||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||||
|
size_t selection = menu_navigation_get_selection();
|
||||||
menu_file_list_cbs_t *cbs = selection_buf ?
|
menu_file_list_cbs_t *cbs = selection_buf ?
|
||||||
(menu_file_list_cbs_t*)
|
(menu_file_list_cbs_t*)
|
||||||
file_list_get_actiondata_at_offset(selection_buf, selection)
|
file_list_get_actiondata_at_offset(selection_buf, selection)
|
||||||
@ -143,6 +144,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
{
|
{
|
||||||
unsigned type = 0;
|
unsigned type = 0;
|
||||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||||
|
size_t selection = menu_navigation_get_selection();
|
||||||
menu_entries_get_at_offset(selection_buf, selection,
|
menu_entries_get_at_offset(selection_buf, selection,
|
||||||
NULL, NULL, &type, NULL, NULL);
|
NULL, NULL, &type, NULL, NULL);
|
||||||
|
|
||||||
@ -218,6 +220,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
case ITERATE_TYPE_DEFAULT:
|
case ITERATE_TYPE_DEFAULT:
|
||||||
{
|
{
|
||||||
menu_entry_t entry;
|
menu_entry_t entry;
|
||||||
|
size_t selection = menu_navigation_get_selection();
|
||||||
/* FIXME: Crappy hack, needed for mouse controls
|
/* FIXME: Crappy hack, needed for mouse controls
|
||||||
* to not be completely broken in case we press back.
|
* to not be completely broken in case we press back.
|
||||||
*
|
*
|
||||||
@ -245,6 +248,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
|||||||
|
|
||||||
if (BIT64_GET(menu->state, MENU_STATE_POP_STACK))
|
if (BIT64_GET(menu->state, MENU_STATE_POP_STACK))
|
||||||
{
|
{
|
||||||
|
size_t selection = menu_navigation_get_selection();
|
||||||
size_t new_selection_ptr = selection;
|
size_t new_selection_ptr = selection;
|
||||||
menu_entries_pop_stack(&new_selection_ptr, 0, 0);
|
menu_entries_pop_stack(&new_selection_ptr, 0, 0);
|
||||||
menu_navigation_set_selection(selection);
|
menu_navigation_set_selection(selection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user