mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42: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;
|
size_t i;
|
||||||
core_info_t *core_info = NULL;
|
core_info_t *core_info = NULL;
|
||||||
core_info_list_t *core_info_list = NULL;
|
core_info_list_t *core_info_list = NULL;
|
||||||
struct string_list *contents =
|
struct string_list *contents = NULL;
|
||||||
dir_list_new_special(NULL, DIR_LIST_CORES, 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)
|
if (!contents)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "list_special.h"
|
#include "list_special.h"
|
||||||
#include "frontend/frontend_driver.h"
|
#include "frontend/frontend_driver.h"
|
||||||
#include "configuration.h"
|
|
||||||
#include "core_info.h"
|
#include "core_info.h"
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
@ -54,10 +53,8 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
|||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *exts = NULL;
|
const char *exts = NULL;
|
||||||
bool include_dirs = false;
|
bool include_dirs = false;
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
(void)input_dir;
|
(void)input_dir;
|
||||||
(void)settings;
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -66,7 +63,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
|||||||
exts = filter;
|
exts = filter;
|
||||||
break;
|
break;
|
||||||
case DIR_LIST_CORES:
|
case DIR_LIST_CORES:
|
||||||
dir = settings->directory.libretro;
|
dir = input_dir;
|
||||||
|
|
||||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -109,11 +106,11 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIR_LIST_COLLECTIONS:
|
case DIR_LIST_COLLECTIONS:
|
||||||
dir = settings->directory.playlist;
|
dir = input_dir;
|
||||||
exts = "lpl";
|
exts = "lpl";
|
||||||
break;
|
break;
|
||||||
case DIR_LIST_DATABASES:
|
case DIR_LIST_DATABASES:
|
||||||
dir = settings->path.content_database;
|
dir = input_dir;
|
||||||
exts = "rdb";
|
exts = "rdb";
|
||||||
break;
|
break;
|
||||||
case DIR_LIST_PLAIN:
|
case DIR_LIST_PLAIN:
|
||||||
|
@ -564,6 +564,7 @@ static void task_database_cleanup_state(
|
|||||||
|
|
||||||
static void task_database_handler(retro_task_t *task)
|
static void task_database_handler(retro_task_t *task)
|
||||||
{
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
db_handle_t *db = (db_handle_t*)task->state;
|
db_handle_t *db = (db_handle_t*)task->state;
|
||||||
database_info_handle_t *dbinfo = db->handle;
|
database_info_handle_t *dbinfo = db->handle;
|
||||||
database_state_handle_t *dbstate = &db->state;
|
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:
|
case DATABASE_STATUS_ITERATE_BEGIN:
|
||||||
if (dbstate && !dbstate->list)
|
if (dbstate && !dbstate->list)
|
||||||
dbstate->list = dir_list_new_special(
|
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;
|
dbinfo->status = DATABASE_STATUS_ITERATE_START;
|
||||||
break;
|
break;
|
||||||
case DATABASE_STATUS_ITERATE_START:
|
case DATABASE_STATUS_ITERATE_START:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user