mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 00: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,
|
||||
NULL);
|
||||
|
||||
content_playlist_write_file(playlist);
|
||||
content_playlist_free(playlist);
|
||||
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 *crc32)
|
||||
{
|
||||
content_playlist_entry_t *entry = NULL;
|
||||
if (!playlist)
|
||||
return;
|
||||
idx = idx - 1;
|
||||
if (idx > playlist->size)
|
||||
return;
|
||||
|
||||
entry = &playlist->entries[idx];
|
||||
|
||||
if (path != NULL)
|
||||
playlist->entries[idx].path = strdup(path);
|
||||
entry->path = strdup(path);
|
||||
if (label != NULL)
|
||||
playlist->entries[idx].label = strdup(label);
|
||||
entry->label = strdup(label);
|
||||
if (core_path != NULL)
|
||||
{
|
||||
playlist->entries[idx].core_path = strdup(core_path);
|
||||
}
|
||||
entry->core_path = strdup(core_path);
|
||||
if (core_name != NULL)
|
||||
{
|
||||
playlist->entries[idx].core_name = strdup(core_name);
|
||||
}
|
||||
entry->core_name = strdup(core_name);
|
||||
if (crc32 != NULL)
|
||||
playlist->entries[idx].crc32 = strdup(crc32);
|
||||
entry->crc32 = strdup(crc32);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user