mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-29 11:10:27 +00:00
Revert "Get rid of menu_common_list_insert"
This reverts commit 23b2dc5c93
.
This commit is contained in:
parent
194b32d7eb
commit
933cc75ccf
@ -18,6 +18,27 @@
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
void menu_common_list_insert(void *data,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
list->list[idx].actiondata = (menu_file_list_cbs_t*)
|
||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
|
||||
if (!list->list[idx].actiondata)
|
||||
{
|
||||
RARCH_ERR("Action data could not be allocated.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
menu_entries_cbs_init(list, path, label, type, idx);
|
||||
}
|
||||
|
||||
void menu_common_list_delete(void *data, size_t idx,
|
||||
size_t list_size)
|
||||
{
|
||||
|
@ -23,6 +23,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void menu_common_list_insert(void *data,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx);
|
||||
|
||||
void menu_common_list_delete(void *data, size_t idx,
|
||||
size_t list_size);
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "../driver.h"
|
||||
#include "menu.h"
|
||||
#include "menu_common_list.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_list.h"
|
||||
#include "menu_navigation.h"
|
||||
|
||||
@ -350,25 +349,12 @@ void menu_list_push(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr)
|
||||
{
|
||||
size_t idx = 0;
|
||||
if (!list || !label)
|
||||
return;
|
||||
|
||||
idx = list->size - 1;
|
||||
|
||||
file_list_push(list, path, label, type, directory_ptr);
|
||||
menu_driver_list_insert(list, path, label, idx);
|
||||
|
||||
list->list[idx].actiondata = (menu_file_list_cbs_t*)
|
||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
|
||||
if (!list->list[idx].actiondata)
|
||||
{
|
||||
RARCH_ERR("Action data could not be allocated.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
menu_entries_cbs_init(list, path, label, type, idx);
|
||||
menu_driver_list_insert(list, path, label, list->size - 1);
|
||||
menu_common_list_insert(list, path, label, type, list->size - 1);
|
||||
}
|
||||
|
||||
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||
|
Loading…
Reference in New Issue
Block a user