mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Pass userdata pointer to environ callback
This commit is contained in:
parent
bd0a427df1
commit
604cbc585f
@ -1142,7 +1142,7 @@ static void mui_context_reset(void)
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
|
||||
static int mui_environ(menu_environ_cb_t type, void *data)
|
||||
static int mui_environ(menu_environ_cb_t type, void *data, void *userdata)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
@ -787,7 +787,7 @@ static void rgui_populate_entries(const char *path,
|
||||
rgui_navigation_set(true);
|
||||
}
|
||||
|
||||
static int rgui_environ(menu_environ_cb_t type, void *data)
|
||||
static int rgui_environ(menu_environ_cb_t type, void *data, void *userdata)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
@ -1115,15 +1115,13 @@ static void xmb_refresh_horizontal_list(xmb_handle_t *xmb)
|
||||
xmb_context_reset_horizontal_list(xmb, themepath);
|
||||
}
|
||||
|
||||
static int xmb_environ(menu_environ_cb_t type, void *data)
|
||||
static int xmb_environ(menu_environ_cb_t type, void *data, void *userdata)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_ENVIRON_RESET_HORIZONTAL_LIST:
|
||||
{
|
||||
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*)userdata;
|
||||
|
||||
if (!xmb)
|
||||
return -1;
|
||||
|
@ -340,10 +340,11 @@ bool menu_driver_load_image(void *data, menu_image_type_t type)
|
||||
bool menu_environment_cb(menu_environ_cb_t type, void *data)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (driver->environ_cb)
|
||||
{
|
||||
int ret = driver->environ_cb(type, data);
|
||||
int ret = driver->environ_cb(type, data, menu->userdata);
|
||||
if (ret == 0)
|
||||
return true;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ typedef struct menu_ctx_driver
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
bool (*load_image)(void *data, menu_image_type_t type);
|
||||
const char *ident;
|
||||
int (*environ_cb)(menu_environ_cb_t type, void *data);
|
||||
int (*environ_cb)(menu_environ_cb_t type, void *data, void *userdata);
|
||||
int (*pointer_tap)(unsigned x, unsigned y, unsigned ptr,
|
||||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action);
|
||||
|
Loading…
x
Reference in New Issue
Block a user