Only display autodetect if there are info files.
This commit is contained in:
parent
e805755f3a
commit
3c3e90b0df
|
@ -149,6 +149,14 @@ void core_info_list_free(core_info_list_t *core_info_list)
|
|||
free(core_info_list);
|
||||
}
|
||||
|
||||
size_t core_info_list_num_info_files(core_info_list_t *core_info_list)
|
||||
{
|
||||
size_t num = 0;
|
||||
for (size_t i = 0; i < core_info_list->count; i++)
|
||||
num += !!core_info_list->list[i].data;
|
||||
return num;
|
||||
}
|
||||
|
||||
bool core_info_list_get_display_name(core_info_list_t *core_info_list, const char *path, char *buf, size_t size)
|
||||
{
|
||||
for (size_t i = 0; i < core_info_list->count; i++)
|
||||
|
|
|
@ -41,6 +41,8 @@ typedef struct {
|
|||
core_info_list_t *core_info_list_new(const char *modules_path);
|
||||
void core_info_list_free(core_info_list_t *core_info_list);
|
||||
|
||||
size_t core_info_list_num_info_files(core_info_list_t *core_info_list);
|
||||
|
||||
bool core_info_does_support_file(const core_info_t *core, const char *path);
|
||||
bool core_info_does_support_any_file(const core_info_t *core, const struct string_list *list);
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
|
|||
if (rgui->history)
|
||||
rgui_list_push(rgui->selection_buf, "Load Game (History)", RGUI_SETTINGS_OPEN_HISTORY, 0);
|
||||
|
||||
if (rgui->core_info && rgui->core_info->count)
|
||||
if (rgui->core_info && core_info_list_num_info_files(rgui->core_info))
|
||||
rgui_list_push(rgui->selection_buf, "Load Game (Detect Core)", RGUI_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE, 0);
|
||||
|
||||
if (rgui->info.library_name || g_extern.system.info.library_name)
|
||||
|
|
Loading…
Reference in New Issue