Cleanup core info code for blackberry (not tested)

This commit is contained in:
meancoot 2013-06-25 21:04:16 -04:00
parent 4f6df19db0
commit 19ce56d91e
3 changed files with 12 additions and 10 deletions

View File

@ -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);

View File

@ -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));
}

View File

@ -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 {