Implemented perform_action callback of menu_driver_ctx

This commit is contained in:
natinusala 2015-05-19 21:20:46 +02:00
parent 508a6ea627
commit e3357b5b5c

View File

@ -940,6 +940,14 @@ void menu_input_post_iterate(int *ret, unsigned action)
*ret |= menu_input_pointer_post_iterate(cbs, &entry, action);
}
static const menu_ctx_driver_t *menu_ctx_driver_get_ptr(void)
{
driver_t *driver = driver_get_ptr();
if (!driver || !driver->menu_ctx)
return NULL;
return driver->menu_ctx;
}
unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
{
unsigned ret = 0;
@ -1029,6 +1037,13 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
if (settings->menu.pointer.enable)
menu_input_pointer(&ret);
return ret;
if (trigger_input && menu_ctx_driver_get_ptr()->perform_action && menu_ctx_driver_get_ptr()->perform_action(menu->userdata, ret))
{
return MENU_ACTION_NOOP;
}
else
{
return ret;
}
}