mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
Remove content_push_to_history_playlist
This commit is contained in:
parent
3f1064d001
commit
af2393b821
@ -134,30 +134,6 @@ static int content_file_read(const char *path, void **buf, ssize_t *length)
|
||||
return filestream_read_file(path, buf, length);
|
||||
}
|
||||
|
||||
bool content_push_to_history_playlist(
|
||||
void *data,
|
||||
const char *path,
|
||||
const char *core_name,
|
||||
const char *core_path)
|
||||
{
|
||||
playlist_t *playlist = (playlist_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* If the history list is not enabled, early return. */
|
||||
if (!settings || !settings->history_list_enable)
|
||||
return false;
|
||||
if (!playlist)
|
||||
return false;
|
||||
|
||||
return playlist_push(playlist,
|
||||
path,
|
||||
NULL,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* content_load_init_wrap:
|
||||
* @args : Input arguments.
|
||||
@ -909,6 +885,7 @@ static bool task_load_content(content_ctx_info_t *content_info,
|
||||
{
|
||||
char name[255];
|
||||
char msg[255];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
name[0] = msg[0] = '\0';
|
||||
|
||||
@ -999,8 +976,18 @@ static bool task_load_content(content_ctx_info_t *content_info,
|
||||
break;
|
||||
}
|
||||
|
||||
if (content_push_to_history_playlist(playlist_tmp, tmp,
|
||||
core_name, core_path))
|
||||
if (
|
||||
settings->history_list_enable
|
||||
&& playlist_tmp
|
||||
&& playlist_push(
|
||||
playlist_tmp,
|
||||
tmp,
|
||||
NULL,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL)
|
||||
)
|
||||
playlist_write_file(playlist_tmp);
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ typedef struct
|
||||
**/
|
||||
static void task_screenshot_handler(retro_task_t *task)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
screenshot_task_state_t *state = (screenshot_task_state_t*)task->state;
|
||||
bool is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL);
|
||||
bool ret = false;
|
||||
@ -154,9 +155,19 @@ static void task_screenshot_handler(retro_task_t *task)
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (ret && !state->silence)
|
||||
if (content_push_to_history_playlist(g_defaults.image_history,
|
||||
if (
|
||||
settings->history_list_enable
|
||||
&& g_defaults.image_history
|
||||
&& playlist_push(
|
||||
g_defaults.image_history,
|
||||
state->filename,
|
||||
"imageviewer", "builtin"))
|
||||
NULL,
|
||||
"builtin",
|
||||
"imageviewer",
|
||||
NULL,
|
||||
NULL
|
||||
)
|
||||
)
|
||||
playlist_write_file(g_defaults.image_history);
|
||||
#endif
|
||||
|
||||
|
@ -150,12 +150,6 @@ void task_image_load_free(retro_task_t *task);
|
||||
|
||||
void task_file_load_handler(retro_task_t *task);
|
||||
|
||||
bool content_push_to_history_playlist(
|
||||
void *data,
|
||||
const char *path,
|
||||
const char *core_name,
|
||||
const char *core_path);
|
||||
|
||||
bool take_screenshot(const char *path, bool silence);
|
||||
|
||||
bool event_load_save_files(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user