1
0
mirror of https://github.com/libretro/RetroArch synced 2025-04-04 22:20:25 +00:00

Fixup style.

This commit is contained in:
Themaister 2014-03-03 10:11:07 +01:00
parent 7a19c34ead
commit 344ebb77e9
3 changed files with 60 additions and 68 deletions

@ -58,7 +58,6 @@ static void core_info_list_resolve_all_firmware(core_info_list_t *core_info_list
size_t i; size_t i;
unsigned c; unsigned c;
for (i = 0; i < core_info_list->count; i++) for (i = 0; i < core_info_list->count; i++)
{ {
core_info_t *info = &core_info_list->list[i]; core_info_t *info = &core_info_list->list[i];
@ -74,7 +73,6 @@ static void core_info_list_resolve_all_firmware(core_info_list_t *core_info_list
if (!info->firmware) if (!info->firmware)
continue; continue;
for (c = 0; c < count; c++) for (c = 0; c < count; c++)
{ {
char path_key[64], desc_key[64]; char path_key[64], desc_key[64];
@ -84,7 +82,6 @@ static void core_info_list_resolve_all_firmware(core_info_list_t *core_info_list
config_get_string(info->data, path_key, &info->firmware[c].path); config_get_string(info->data, path_key, &info->firmware[c].path);
config_get_string(info->data, desc_key, &info->firmware[c].desc); config_get_string(info->data, desc_key, &info->firmware[c].desc);
} }
} }
} }
@ -136,10 +133,10 @@ core_info_list_t *core_info_list_new(const char *modules_path)
if (core_info[i].data) if (core_info[i].data)
{ {
unsigned count=0; unsigned count = 0;
config_get_string(core_info[i].data, "display_name", &core_info[i].display_name); config_get_string(core_info[i].data, "display_name", &core_info[i].display_name);
config_get_uint(core_info[i].data, "firmware_count", &count); config_get_uint(core_info[i].data, "firmware_count", &count);
core_info[i].firmware_count=count; core_info[i].firmware_count = count;
if (config_get_string(core_info[i].data, "supported_extensions", &core_info[i].supported_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)
core_info[i].supported_extensions_list = string_split(core_info[i].supported_extensions, "|"); core_info[i].supported_extensions_list = string_split(core_info[i].supported_extensions, "|");
@ -369,13 +366,12 @@ void core_info_list_update_missing_firmware(core_info_list_t *core_info_list,
for (i = 0; i < info->firmware_count; i++) for (i = 0; i < info->firmware_count; i++)
{ {
if(info->firmware[i].path) if (info->firmware[i].path)
{ {
fill_pathname_join(path, systemdir, info->firmware[i].path, sizeof(path)); fill_pathname_join(path, systemdir, info->firmware[i].path, sizeof(path));
info->firmware[i].missing = !path_file_exists(path); info->firmware[i].missing = !path_file_exists(path);
} }
} }
} }
void core_info_list_get_missing_firmware(core_info_list_t *core_info_list, void core_info_list_get_missing_firmware(core_info_list_t *core_info_list,

@ -1926,12 +1926,9 @@ void menu_populate_entries(void *data, unsigned menu_type)
file_list_push(rgui->selection_buf, "No options available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0); file_list_push(rgui->selection_buf, "No options available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0);
break; break;
case RGUI_SETTINGS_CORE_INFO: case RGUI_SETTINGS_CORE_INFO:
if(rgui->core_info_current.data)
{
file_list_clear(rgui->selection_buf); file_list_clear(rgui->selection_buf);
if (rgui->core_info_current.data)
{
snprintf(tmp, sizeof(tmp), "Core name: %s", rgui->core_info_current.display_name ? rgui->core_info_current.display_name : ""); snprintf(tmp, sizeof(tmp), "Core name: %s", rgui->core_info_current.display_name ? rgui->core_info_current.display_name : "");
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
snprintf(tmp, sizeof(tmp), "Authors: %s", rgui->core_info_current.authors ? rgui->core_info_current.authors : ""); snprintf(tmp, sizeof(tmp), "Authors: %s", rgui->core_info_current.authors ? rgui->core_info_current.authors : "");
@ -1941,39 +1938,37 @@ void menu_populate_entries(void *data, unsigned menu_type)
snprintf(tmp, sizeof(tmp), "Supported extensions: %s", rgui->core_info_current.supported_extensions ? rgui->core_info_current.supported_extensions : ""); snprintf(tmp, sizeof(tmp), "Supported extensions: %s", rgui->core_info_current.supported_extensions ? rgui->core_info_current.supported_extensions : "");
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
if(rgui->core_info_current.firmware_count>0) if (rgui->core_info_current.firmware_count > 0)
{ {
core_info_list_update_missing_firmware(rgui->core_info, rgui->core_info_current.path, g_settings.system_directory); core_info_list_update_missing_firmware(rgui->core_info, rgui->core_info_current.path, g_settings.system_directory);
file_list_push(rgui->selection_buf, "Required firmware:", RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, "Required firmware:", RGUI_SETTINGS_CORE_INFO_NONE, 0);
for(i=0;i<rgui->core_info_current.firmware_count;i++) for (i = 0; i < rgui->core_info_current.firmware_count; i++)
{ {
if(rgui->core_info_current.firmware[i].desc) if (rgui->core_info_current.firmware[i].desc)
{ {
snprintf(tmp, sizeof(tmp), " Name: %s, %s", rgui->core_info_current.firmware[i].desc ? rgui->core_info_current.firmware[i].desc : "",rgui->core_info_current.firmware[i].missing ? "missing" : "present"); snprintf(tmp, sizeof(tmp), " Name: %s, %s",
rgui->core_info_current.firmware[i].desc ? rgui->core_info_current.firmware[i].desc : "",
rgui->core_info_current.firmware[i].missing ? "missing" : "present");
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
} }
} }
} }
if(rgui->core_info_current.notes)
if (rgui->core_info_current.notes)
{ {
snprintf(tmp, sizeof(tmp), "Core notes: "); snprintf(tmp, sizeof(tmp), "Core notes: ");
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
for(i=0;i<rgui->core_info_current.note_list->size;i++) for (i = 0; i < rgui->core_info_current.note_list->size; i++)
{ {
snprintf(tmp, sizeof(tmp), " %s", rgui->core_info_current.note_list->elems[i].data); snprintf(tmp, sizeof(tmp), " %s", rgui->core_info_current.note_list->elems[i].data);
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0); file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
} }
} }
} }
else else
{
file_list_clear(rgui->selection_buf);
file_list_push(rgui->selection_buf, "No information available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0); file_list_push(rgui->selection_buf, "No information available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0);
}
break; break;
case RGUI_SETTINGS_OPTIONS: case RGUI_SETTINGS_OPTIONS:
file_list_clear(rgui->selection_buf); file_list_clear(rgui->selection_buf);

@ -2066,6 +2066,7 @@ void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w,
case RGUI_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE: case RGUI_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE:
case RGUI_SETTINGS_OPEN_HISTORY: case RGUI_SETTINGS_OPEN_HISTORY:
case RGUI_SETTINGS_CORE_OPTIONS: case RGUI_SETTINGS_CORE_OPTIONS:
case RGUI_SETTINGS_CORE_INFO:
case RGUI_SETTINGS_CUSTOM_VIEWPORT: case RGUI_SETTINGS_CUSTOM_VIEWPORT:
case RGUI_SETTINGS_TOGGLE_FULLSCREEN: case RGUI_SETTINGS_TOGGLE_FULLSCREEN:
case RGUI_SETTINGS_VIDEO_OPTIONS: case RGUI_SETTINGS_VIDEO_OPTIONS: