mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Get rid of configuration.h dependency in list_special.c
This commit is contained in:
parent
8345ad2aba
commit
397f82c9f5
11
core_info.c
11
core_info.c
@ -195,8 +195,15 @@ static core_info_list_t *core_info_list_new(void)
|
||||
size_t i;
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
struct string_list *contents =
|
||||
dir_list_new_special(NULL, DIR_LIST_CORES, NULL);
|
||||
struct string_list *contents = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
return NULL;
|
||||
|
||||
contents = dir_list_new_special(
|
||||
settings->directory.libretro,
|
||||
DIR_LIST_CORES, NULL);
|
||||
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "list_special.h"
|
||||
#include "frontend/frontend_driver.h"
|
||||
#include "configuration.h"
|
||||
#include "core_info.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -54,10 +53,8 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
const char *dir = NULL;
|
||||
const char *exts = NULL;
|
||||
bool include_dirs = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
(void)input_dir;
|
||||
(void)settings;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -66,7 +63,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
exts = filter;
|
||||
break;
|
||||
case DIR_LIST_CORES:
|
||||
dir = settings->directory.libretro;
|
||||
dir = input_dir;
|
||||
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
return NULL;
|
||||
@ -109,11 +106,11 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
}
|
||||
break;
|
||||
case DIR_LIST_COLLECTIONS:
|
||||
dir = settings->directory.playlist;
|
||||
dir = input_dir;
|
||||
exts = "lpl";
|
||||
break;
|
||||
case DIR_LIST_DATABASES:
|
||||
dir = settings->path.content_database;
|
||||
dir = input_dir;
|
||||
exts = "rdb";
|
||||
break;
|
||||
case DIR_LIST_PLAIN:
|
||||
|
@ -564,6 +564,7 @@ static void task_database_cleanup_state(
|
||||
|
||||
static void task_database_handler(retro_task_t *task)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
db_handle_t *db = (db_handle_t*)task->state;
|
||||
database_info_handle_t *dbinfo = db->handle;
|
||||
database_state_handle_t *dbstate = &db->state;
|
||||
@ -578,7 +579,8 @@ static void task_database_handler(retro_task_t *task)
|
||||
case DATABASE_STATUS_ITERATE_BEGIN:
|
||||
if (dbstate && !dbstate->list)
|
||||
dbstate->list = dir_list_new_special(
|
||||
NULL, DIR_LIST_DATABASES, NULL);
|
||||
settings->path.content_database,
|
||||
DIR_LIST_DATABASES, NULL);
|
||||
dbinfo->status = DATABASE_STATUS_ITERATE_START;
|
||||
break;
|
||||
case DATABASE_STATUS_ITERATE_START:
|
||||
|
Loading…
x
Reference in New Issue
Block a user