mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Reimplement core_info_get_first_custom_config
This commit is contained in:
parent
e0f5fb4c20
commit
ba11aa1312
15
core_info.c
15
core_info.c
@ -490,3 +490,18 @@ void core_info_list_get_missing_firmware(core_info_list_t *core_info_list,
|
||||
core_info_firmware_cmp);
|
||||
}
|
||||
|
||||
bool core_info_get_first_custom_config(const char *core_id,
|
||||
char *buf, size_t sizeof_buf)
|
||||
{
|
||||
if (!core_id || !buf || !sizeof_buf)
|
||||
return false;
|
||||
|
||||
fill_pathname_join(buf, g_defaults.menu_config_dir,
|
||||
path_basename(core_id), sizeof_buf);
|
||||
fill_pathname(buf, buf, ".cfg", sizeof_buf);
|
||||
|
||||
if (buf[0] == '\0')
|
||||
return false;
|
||||
|
||||
return path_file_exists(buf);
|
||||
}
|
||||
|
@ -101,6 +101,9 @@ bool core_info_list_get_display_name(core_info_list_t *list,
|
||||
bool core_info_list_get_by_id(core_info_list_t *core_info_list,
|
||||
core_info_t *out_info, const char *core_id);
|
||||
|
||||
bool core_info_get_first_custom_config(const char *core_id,
|
||||
char *buf, size_t sizeof_buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user