Permalink
Browse files

Cleanup core info code for blackberry (not tested)

  • Loading branch information...
1 parent 4f6df19 commit 19ce56d91e7432bcfd74bd2dde7fa2e3da0ce217 @meancoot meancoot committed Jun 26, 2013
Showing with 12 additions and 10 deletions.
  1. +3 −3 blackberry-qnx/bb10/src/RetroArch-Cascades.cpp
  2. +7 −6 core_info.c
  3. +2 −1 core_info.h
@@ -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
@@ -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
@@ -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 {

0 comments on commit 19ce56d

Please sign in to comment.