mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Move command_playlist_ functions to playlist.c
(RGUI) Header buildfix
This commit is contained in:
parent
8349f9217c
commit
9bb7132b97
50
command.c
50
command.c
@ -1766,56 +1766,6 @@ static bool command_event_resize_windowed_scale(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
if (playlist_push(
|
||||
playlist,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL
|
||||
))
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *plist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
playlist_update(
|
||||
playlist,
|
||||
idx,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_display_name,
|
||||
crc32,
|
||||
db_name);
|
||||
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
* @cmd : Event command index.
|
||||
|
19
command.h
19
command.h
@ -27,8 +27,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "playlist.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct command command_t;
|
||||
@ -272,23 +270,6 @@ bool command_free(command_t *handle);
|
||||
**/
|
||||
bool command_event(enum event_command action, void *data);
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *playlist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <string/stdstring.h>
|
||||
#include <lists/file_list.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <compat/strl.h>
|
||||
#include <compat/posix_string.h>
|
||||
@ -36,6 +37,7 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../playlist.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
|
||||
#include "menu_generic.h"
|
||||
|
50
playlist.c
50
playlist.c
@ -1057,3 +1057,53 @@ void playlist_qsort(playlist_t *playlist)
|
||||
sizeof(struct playlist_entry),
|
||||
(int (*)(const void *, const void *))playlist_qsort_func);
|
||||
}
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
if (playlist_push(
|
||||
playlist,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL
|
||||
))
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *plist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
playlist_update(
|
||||
playlist,
|
||||
idx,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_display_name,
|
||||
crc32,
|
||||
db_name);
|
||||
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
17
playlist.h
17
playlist.h
@ -135,6 +135,23 @@ playlist_t *playlist_get_cached(void);
|
||||
|
||||
bool playlist_init_cached(const char *path, size_t size);
|
||||
|
||||
void command_playlist_push_write(
|
||||
playlist_t *playlist,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
void command_playlist_update_write(
|
||||
playlist_t *playlist,
|
||||
size_t idx,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_display_name,
|
||||
const char *crc32,
|
||||
const char *db_name);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user