mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 05:16:55 +00:00
Cleanup core info code for blackberry (not tested)
This commit is contained in:
parent
4f6df19db0
commit
19ce56d91e
@ -250,7 +250,7 @@ void RetroArch::onCoreSelected(QVariant value)
|
||||
core.append(core_info_list->list[coreSelectedIndex].path);
|
||||
emit coreChanged(core);
|
||||
|
||||
romExtensions = QString("*.%1").arg(core_info_list->list[coreSelectedIndex].supportedExtensions);
|
||||
romExtensions = QString("*.%1").arg(core_info_list->list[coreSelectedIndex].supported_extensions);
|
||||
romExtensions.replace("|", "|*.");
|
||||
emit romExtensionsChanged(romExtensions);
|
||||
|
||||
@ -296,9 +296,9 @@ void RetroArch::populateCores(core_info_list_t * info)
|
||||
//Populate DropDown
|
||||
for (i = 0; i < info->count; ++i)
|
||||
{
|
||||
qDebug() << info->list[i].displayName;
|
||||
qDebug() << info->list[i].display_name;
|
||||
|
||||
tmp = Option::create().text(QString(info->list[i].displayName))
|
||||
tmp = Option::create().text(QString(info->list[i].display_name))
|
||||
.value(i);
|
||||
|
||||
coreSelection->add(tmp);
|
||||
|
13
core_info.c
13
core_info.c
@ -65,9 +65,9 @@ core_info_list_t *get_core_info_list(const char *modules_path)
|
||||
{
|
||||
config_get_string(core_info[i].data, "display_name", &core_info[i].display_name);
|
||||
|
||||
char* extensions;
|
||||
if (config_get_string(core_info[i].data, "supported_extensions", &extensions) && extensions)
|
||||
core_info[i].supported_extensions = string_split(extensions, "|");
|
||||
if (config_get_string(core_info[i].data, "supported_extensions", &core_info[i].supported_extensions) &&
|
||||
core_info[i].supported_extensions)
|
||||
core_info[i].supported_extensions_list = string_split(core_info[i].supported_extensions, "|");
|
||||
}
|
||||
|
||||
if (!core_info[i].display_name)
|
||||
@ -90,7 +90,8 @@ void free_core_info_list(core_info_list_t *core_info_list)
|
||||
{
|
||||
free(core_info_list->list[i].path);
|
||||
free(core_info_list->list[i].display_name);
|
||||
string_list_free(core_info_list->list[i].supported_extensions);
|
||||
free(core_info_list->list[i].supported_extensions);
|
||||
string_list_free(core_info_list->list[i].supported_extensions_list);
|
||||
config_file_free(core_info_list->list[i].data);
|
||||
}
|
||||
|
||||
@ -100,9 +101,9 @@ void free_core_info_list(core_info_list_t *core_info_list)
|
||||
|
||||
bool does_core_support_file(core_info_t* core, const char *path)
|
||||
{
|
||||
if (!path || !core || !core->supported_extensions)
|
||||
if (!path || !core || !core->supported_extensions_list)
|
||||
return false;
|
||||
|
||||
return string_list_find_elem_prefix(core->supported_extensions, ".", path_get_extension(path));
|
||||
return string_list_find_elem_prefix(core->supported_extensions_list, ".", path_get_extension(path));
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,8 @@ typedef struct {
|
||||
char * path;
|
||||
config_file_t* data;
|
||||
char * display_name;
|
||||
struct string_list * supported_extensions;
|
||||
char * supported_extensions;
|
||||
struct string_list * supported_extensions_list;
|
||||
} core_info_t;
|
||||
|
||||
typedef struct {
|
||||
|
Loading…
Reference in New Issue
Block a user