mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
Cleanup content_playlist_update
This commit is contained in:
parent
18e68918f3
commit
a19f6e21d8
@ -804,7 +804,6 @@ static int action_ok_core_deferred_set(const char *path,
|
|||||||
path , core_display_name,
|
path , core_display_name,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
content_playlist_write_file(playlist);
|
|
||||||
content_playlist_free(playlist);
|
content_playlist_free(playlist);
|
||||||
menu->playlist = NULL;
|
menu->playlist = NULL;
|
||||||
|
|
||||||
|
17
playlist.c
17
playlist.c
@ -124,26 +124,25 @@ void content_playlist_update(content_playlist_t *playlist, size_t idx,
|
|||||||
const char *core_path, const char *core_name,
|
const char *core_path, const char *core_name,
|
||||||
const char *crc32)
|
const char *crc32)
|
||||||
{
|
{
|
||||||
|
content_playlist_entry_t *entry = NULL;
|
||||||
if (!playlist)
|
if (!playlist)
|
||||||
return;
|
return;
|
||||||
idx = idx - 1;
|
idx = idx - 1;
|
||||||
if (idx > playlist->size)
|
if (idx > playlist->size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
entry = &playlist->entries[idx];
|
||||||
|
|
||||||
if (path != NULL)
|
if (path != NULL)
|
||||||
playlist->entries[idx].path = strdup(path);
|
entry->path = strdup(path);
|
||||||
if (label != NULL)
|
if (label != NULL)
|
||||||
playlist->entries[idx].label = strdup(label);
|
entry->label = strdup(label);
|
||||||
if (core_path != NULL)
|
if (core_path != NULL)
|
||||||
{
|
entry->core_path = strdup(core_path);
|
||||||
playlist->entries[idx].core_path = strdup(core_path);
|
|
||||||
}
|
|
||||||
if (core_name != NULL)
|
if (core_name != NULL)
|
||||||
{
|
entry->core_name = strdup(core_name);
|
||||||
playlist->entries[idx].core_name = strdup(core_name);
|
|
||||||
}
|
|
||||||
if (crc32 != NULL)
|
if (crc32 != NULL)
|
||||||
playlist->entries[idx].crc32 = strdup(crc32);
|
entry->crc32 = strdup(crc32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user