Merge pull request #828 from lakkatv/lakka

(Lakka) Use systemname for lakka menu icons
This commit is contained in:
Twinaphex 2014-07-21 22:45:18 +02:00
commit 79af6d1b45
3 changed files with 8 additions and 8 deletions

View File

@ -145,6 +145,7 @@ core_info_list_t *core_info_list_new(const char *modules_path)
{
unsigned count = 0;
config_get_string(core_info[i].data, "display_name", &core_info[i].display_name);
config_get_string(core_info[i].data, "systemname", &core_info[i].systemname);
config_get_uint(core_info[i].data, "firmware_count", &count);
core_info[i].firmware_count = count;
if (config_get_string(core_info[i].data, "supported_extensions", &core_info[i].supported_extensions) &&

View File

@ -39,6 +39,7 @@ typedef struct
char *path;
config_file_t *data;
char *display_name;
char *systemname;
char *supported_extensions;
char *authors;
char *permissions;

View File

@ -824,14 +824,12 @@ static void lakka_context_reset(void *data)
if (info_list)
info = (core_info_t*)&info_list->list[i-1];
strlcpy(core_id, basename(info->path), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, ".so", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, ".dll", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, ".dylib", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, "-libretro", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, "_libretro", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, "libretro-", ""), sizeof(core_id));
strlcpy(core_id, str_replace(core_id, "libretro_", ""), sizeof(core_id));
if (info->systemname) {
strlcpy(core_id, info->systemname, sizeof(core_id));
strlcpy(core_id, str_replace(core_id, "/", " "), sizeof(core_id));
} else {
strlcpy(core_id, "default", sizeof(core_id));
}
strlcpy(texturepath, themepath, sizeof(texturepath));
strlcat(texturepath, core_id, sizeof(texturepath));