mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Allow menu wallpaper/background reset (#14650)
This commit is contained in:
parent
43b6d59740
commit
e52b633e5a
@ -469,6 +469,25 @@ static int action_start_state_slot(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_start_menu_wallpaper(
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
|
||||
settings->paths.path_menu_wallpaper[0] = '\0';
|
||||
|
||||
/* Reset wallpaper by menu context reset */
|
||||
if (menu_st->driver_ctx && menu_st->driver_ctx->context_reset)
|
||||
{
|
||||
menu_st->driver_ctx->context_reset(menu_st->userdata,
|
||||
video_driver_is_threaded());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_start_playlist_sort_mode(
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx, size_t entry_idx)
|
||||
@ -812,6 +831,9 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
|
||||
case MENU_ENUM_LABEL_STATE_SLOT:
|
||||
BIND_ACTION_START(cbs, action_start_state_slot);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_WALLPAPER:
|
||||
BIND_ACTION_START(cbs, action_start_menu_wallpaper);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user