mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-01 22:42:22 +00:00
Revert "(Menu) Get rid of more RARCH_MENU_CTL_DRIVER_DATA_GET calls"
This reverts commit cb3b5d72abe87f95585f1aa460de5c97abdf407f.
This commit is contained in:
parent
87c9d9eb9a
commit
21244c6ec7
@ -254,7 +254,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
||||
}
|
||||
|
||||
if (BIT64_GET(menu->state, MENU_STATE_POST_ITERATE))
|
||||
menu_input_post_iterate(menu, &ret, action);
|
||||
menu_input_post_iterate(&ret, action);
|
||||
|
||||
end:
|
||||
if (ret)
|
||||
|
@ -210,7 +210,6 @@ static int menu_input_mouse_post_iterate(uint64_t *input_mouse,
|
||||
}
|
||||
|
||||
static int menu_input_mouse_frame(
|
||||
menu_handle_t *menu,
|
||||
menu_file_list_cbs_t *cbs, menu_entry_t *entry,
|
||||
unsigned action)
|
||||
{
|
||||
@ -288,6 +287,10 @@ static int menu_input_mouse_frame(
|
||||
if (BIT64_GET(mouse_state, MENU_MOUSE_ACTION_BUTTON_R))
|
||||
{
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
menu_handle_t *menu = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu);
|
||||
|
||||
menu_entry_action(entry, menu,
|
||||
(unsigned)selection,
|
||||
MENU_ACTION_CANCEL);
|
||||
@ -412,7 +415,6 @@ int16_t menu_input_mouse_state(enum menu_input_mouse_state state)
|
||||
}
|
||||
|
||||
static int menu_input_pointer_post_iterate(
|
||||
menu_handle_t *menu,
|
||||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
@ -526,6 +528,10 @@ static int menu_input_pointer_post_iterate(
|
||||
if (menu_input->pointer.counter > 32)
|
||||
{
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
menu_handle_t *menu = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu);
|
||||
|
||||
if (cbs && cbs->action_start)
|
||||
return menu_entry_action(entry, menu,
|
||||
(unsigned)selection,
|
||||
@ -558,7 +564,11 @@ static int menu_input_pointer_post_iterate(
|
||||
{
|
||||
if (!pointer_oldback)
|
||||
{
|
||||
menu_handle_t *menu = NULL;
|
||||
pointer_oldback = true;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu);
|
||||
|
||||
menu_entry_action(entry, menu,
|
||||
(unsigned)menu_navigation_get_selection(),
|
||||
MENU_ACTION_CANCEL);
|
||||
@ -570,7 +580,7 @@ static int menu_input_pointer_post_iterate(
|
||||
return ret;
|
||||
}
|
||||
|
||||
void menu_input_post_iterate(void *data, int *ret, unsigned action)
|
||||
void menu_input_post_iterate(int *ret, unsigned action)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -582,10 +592,11 @@ void menu_input_post_iterate(void *data, int *ret, unsigned action)
|
||||
menu_entry_init(&entry);
|
||||
menu_entry_get(&entry, 0, selection, NULL, false);
|
||||
|
||||
*ret = menu_input_mouse_frame(data, cbs, &entry, action);
|
||||
*ret = menu_input_mouse_frame(cbs, &entry, action);
|
||||
|
||||
if (settings->bools.menu_pointer_enable)
|
||||
*ret |= menu_input_pointer_post_iterate(data, cbs, &entry, action);
|
||||
*ret |= menu_input_pointer_post_iterate(cbs, &entry, action);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
}
|
||||
|
||||
|
@ -108,8 +108,7 @@ typedef struct menu_input_ctx_hitbox
|
||||
int32_t y2;
|
||||
} menu_input_ctx_hitbox_t;
|
||||
|
||||
void menu_input_post_iterate(void *data,
|
||||
int *ret, unsigned action);
|
||||
void menu_input_post_iterate(int *ret, unsigned action);
|
||||
|
||||
int16_t menu_input_pointer_state(enum menu_input_pointer_state state);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user