mirror of
https://github.com/libretro/RetroArch
synced 2025-02-23 15:40:35 +00:00
Remove more settings_t dependencies
This commit is contained in:
parent
d3e0d03301
commit
cd20966fc8
@ -6349,7 +6349,7 @@ static int action_ok_pl_content_thumbnails(const char *path,
|
|||||||
settings->paths.directory_playlist, label,
|
settings->paths.directory_playlist, label,
|
||||||
sizeof(playlist_path));
|
sizeof(playlist_path));
|
||||||
|
|
||||||
task_push_pl_thumbnail_download(path, playlist_path);
|
task_push_pl_thumbnail_download(path, playlist_path, settings->paths.directory_thumbnails);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -471,22 +471,22 @@ static bool task_pl_thumbnail_finder(retro_task_t *task, void *user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool task_push_pl_thumbnail_download(
|
bool task_push_pl_thumbnail_download(
|
||||||
const char *system, const char *playlist_path)
|
const char *system, const char *playlist_path,
|
||||||
|
const char *dir_thumbnails)
|
||||||
{
|
{
|
||||||
task_finder_data_t find_data;
|
task_finder_data_t find_data;
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
retro_task_t *task = task_init();
|
retro_task_t *task = task_init();
|
||||||
pl_thumb_handle_t *pl_thumb = (pl_thumb_handle_t*)calloc(1, sizeof(pl_thumb_handle_t));
|
pl_thumb_handle_t *pl_thumb = (pl_thumb_handle_t*)calloc(1, sizeof(pl_thumb_handle_t));
|
||||||
const char *playlist_file = path_basename(playlist_path);
|
const char *playlist_file = path_basename(playlist_path);
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if (!settings || !task || !pl_thumb)
|
if (!task || !pl_thumb)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (string_is_empty(system) ||
|
if (string_is_empty(system) ||
|
||||||
string_is_empty(playlist_path) ||
|
string_is_empty(playlist_path) ||
|
||||||
string_is_empty(playlist_file) ||
|
string_is_empty(playlist_file) ||
|
||||||
string_is_empty(settings->paths.directory_thumbnails))
|
string_is_empty(dir_thumbnails))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* Only parse supported playlist types */
|
/* Only parse supported playlist types */
|
||||||
@ -518,7 +518,7 @@ bool task_push_pl_thumbnail_download(
|
|||||||
/* Configure handle */
|
/* Configure handle */
|
||||||
pl_thumb->system = strdup(system);
|
pl_thumb->system = strdup(system);
|
||||||
pl_thumb->playlist_path = strdup(playlist_path);
|
pl_thumb->playlist_path = strdup(playlist_path);
|
||||||
pl_thumb->dir_thumbnails = strdup(settings->paths.directory_thumbnails);
|
pl_thumb->dir_thumbnails = strdup(dir_thumbnails);
|
||||||
pl_thumb->playlist = NULL;
|
pl_thumb->playlist = NULL;
|
||||||
pl_thumb->thumbnail_path_data = NULL;
|
pl_thumb->thumbnail_path_data = NULL;
|
||||||
pl_thumb->http_task = NULL;
|
pl_thumb->http_task = NULL;
|
||||||
@ -591,6 +591,7 @@ static void cb_task_pl_entry_thumbnail_refresh_menu(
|
|||||||
if (string_is_empty(playlist_get_conf_path(current_playlist)))
|
if (string_is_empty(playlist_get_conf_path(current_playlist)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef HAVE_MATERIALUI
|
||||||
if (string_is_equal(settings->arrays.menu_driver, "glui"))
|
if (string_is_equal(settings->arrays.menu_driver, "glui"))
|
||||||
{
|
{
|
||||||
if (!string_is_equal(pl_thumb->playlist_path,
|
if (!string_is_equal(pl_thumb->playlist_path,
|
||||||
@ -598,6 +599,7 @@ static void cb_task_pl_entry_thumbnail_refresh_menu(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (((pl_thumb->list_index != menu_navigation_get_selection()) &&
|
if (((pl_thumb->list_index != menu_navigation_get_selection()) &&
|
||||||
(pl_thumb->list_index != menu->rpl_entry_selection_ptr)) ||
|
(pl_thumb->list_index != menu->rpl_entry_selection_ptr)) ||
|
||||||
|
@ -97,7 +97,10 @@ void *task_push_core_updater_download(
|
|||||||
void task_push_update_installed_cores(const char *path_dir_libretro);
|
void task_push_update_installed_cores(const char *path_dir_libretro);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool task_push_pl_thumbnail_download(const char *system, const char *playlist_path);
|
bool task_push_pl_thumbnail_download(
|
||||||
|
const char *system, const char *playlist_path,
|
||||||
|
const char *dir_thumbnails);
|
||||||
|
|
||||||
bool task_push_pl_entry_thumbnail_download(
|
bool task_push_pl_entry_thumbnail_download(
|
||||||
const char *system,
|
const char *system,
|
||||||
playlist_t *playlist,
|
playlist_t *playlist,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user