mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
core_info_get_display_name - use config_file_new_from_string
This commit is contained in:
parent
41481dfc73
commit
a465971556
12
core_info.c
12
core_info.c
@ -923,8 +923,16 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list,
|
||||
|
||||
bool core_info_get_display_name(const char *path, char *s, size_t len)
|
||||
{
|
||||
char *tmp = NULL;
|
||||
config_file_t *conf = config_file_new(path);
|
||||
int64_t length = 0;
|
||||
char *tmp = NULL;
|
||||
config_file_t *conf = NULL;
|
||||
uint8_t *ret_buf = NULL;
|
||||
if (filestream_read_file(path, (void**)&ret_buf, &length))
|
||||
{
|
||||
if (length >= 0)
|
||||
conf = config_file_new_from_string((const char*)ret_buf);
|
||||
free((void*)ret_buf);
|
||||
}
|
||||
|
||||
if (!conf)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user