mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Start implementing the callback for add-to-favorites
This commit is contained in:
parent
42012389cd
commit
9dfb39c672
@ -2173,6 +2173,9 @@ bool command_event(enum event_command cmd, void *data)
|
||||
if (ui_companion_is_on_foreground())
|
||||
ui_companion_driver_toggle();
|
||||
break;
|
||||
case CMD_EVENT_ADD_TO_FAVORITES:
|
||||
printf("Add to favorites\n");
|
||||
break;
|
||||
case CMD_EVENT_RESTART_RETROARCH:
|
||||
if (!frontend_driver_set_fork(FRONTEND_FORK_RESTART))
|
||||
return false;
|
||||
|
@ -134,6 +134,8 @@ enum event_command
|
||||
CMD_EVENT_REBOOT,
|
||||
/* Resume RetroArch when in menu. */
|
||||
CMD_EVENT_RESUME,
|
||||
/* Add a playlist entry to favorites. */
|
||||
CMD_EVENT_ADD_TO_FAVORITES,
|
||||
/* Toggles pause. */
|
||||
CMD_EVENT_PAUSE_TOGGLE,
|
||||
/* Pauses RetroArch. */
|
||||
|
@ -3103,6 +3103,12 @@ static int action_ok_resume_content(const char *path,
|
||||
return generic_action_ok_command(CMD_EVENT_RESUME);
|
||||
}
|
||||
|
||||
static int action_ok_add_to_favorites(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_command(CMD_EVENT_ADD_TO_FAVORITES);
|
||||
}
|
||||
|
||||
static int action_ok_restart_content(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -4590,6 +4596,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_RESUME_CONTENT:
|
||||
BIND_ACTION_OK(cbs, action_ok_resume_content);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES:
|
||||
BIND_ACTION_OK(cbs, action_ok_add_to_favorites);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RESTART_CONTENT:
|
||||
BIND_ACTION_OK(cbs, action_ok_restart_content);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user