mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Move data pointer to navigation_clear callback
This commit is contained in:
parent
cfaca8439d
commit
78db1845dc
@ -1080,10 +1080,9 @@ static void mui_list_set_selection(file_list_t *list)
|
||||
mui_navigation_set(true);
|
||||
}
|
||||
|
||||
static void mui_navigation_clear(bool pending_push)
|
||||
static void mui_navigation_clear(void *data, bool pending_push)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
mui_handle_t *mui = menu ? (mui_handle_t*)menu->userdata : NULL;
|
||||
mui_handle_t *mui = (mui_handle_t*)data;
|
||||
if (!mui)
|
||||
return;
|
||||
|
||||
|
@ -733,10 +733,9 @@ static void rgui_set_texture(void)
|
||||
video_driver_set_texture_frame(fb_data, false, fb_width, fb_height, 1.0f);
|
||||
}
|
||||
|
||||
static void rgui_navigation_clear(bool pending_push)
|
||||
static void rgui_navigation_clear(void *data, bool pending_push)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
rgui_t *rgui = menu ? (rgui_t*)menu->userdata : NULL;
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
if (!rgui)
|
||||
return;
|
||||
|
||||
|
@ -619,7 +619,7 @@ static void rmenu_xui_populate_entries(const char *path,
|
||||
XuiListSetCurSelVisible(m_menulist, selection);
|
||||
}
|
||||
|
||||
static void rmenu_xui_navigation_clear(bool pending_push)
|
||||
static void rmenu_xui_navigation_clear(void *data, bool pending_push)
|
||||
{
|
||||
size_t selection;
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||
|
@ -2225,10 +2225,9 @@ static void xmb_context_reset(void *data)
|
||||
xmb_update_boxart_image(xmb);
|
||||
}
|
||||
|
||||
static void xmb_navigation_clear(bool pending_push)
|
||||
static void xmb_navigation_clear(void *data, bool pending_push)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
xmb_handle_t *xmb = menu ? (xmb_handle_t*)menu->userdata : NULL;
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
if (!pending_push)
|
||||
xmb_selection_pointer_changed(xmb, true);
|
||||
}
|
||||
|
@ -364,6 +364,17 @@ int menu_driver_pointer_tap(unsigned x, unsigned y, unsigned ptr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
void menu_driver_navigation_clear(bool pending_push)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (!menu_driver_data)
|
||||
return;
|
||||
|
||||
if (driver->navigation_clear)
|
||||
driver->navigation_clear(menu_driver_data->userdata, pending_push);
|
||||
}
|
||||
|
||||
static void menu_environment_get(int *argc, char *argv[],
|
||||
void *args, void *params_data)
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ typedef struct menu_ctx_driver
|
||||
const char *path, const char *label,
|
||||
unsigned k);
|
||||
void (*toggle)(void *userdata, bool);
|
||||
void (*navigation_clear)(bool);
|
||||
void (*navigation_clear)(void *, bool);
|
||||
void (*navigation_decrement)(void);
|
||||
void (*navigation_increment)(void);
|
||||
void (*navigation_set)(bool);
|
||||
@ -370,6 +370,8 @@ int menu_driver_pointer_tap(unsigned x, unsigned y, unsigned ptr,
|
||||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action);
|
||||
|
||||
void menu_driver_navigation_clear(bool pending_push);
|
||||
|
||||
/* HACK */
|
||||
extern unsigned int rdb_entry_start_game_selection_ptr;
|
||||
|
||||
|
@ -78,8 +78,7 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &idx);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET, &scroll);
|
||||
if (driver->navigation_clear)
|
||||
driver->navigation_clear(*pending_push);
|
||||
menu_driver_navigation_clear(*pending_push);
|
||||
}
|
||||
return true;
|
||||
case MENU_NAVIGATION_CTL_INCREMENT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user