diff --git a/file_path_special.c b/file_path_special.c index ff5a41b399..92efc533a7 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -270,6 +270,34 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe { switch (type) { + case APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS: +#ifdef HAVE_ZARCH + { + } +#endif + break; + case APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_FONT: +#ifdef HAVE_ZARCH + { + char s1[PATH_MAX_LENGTH] = {0}; + fill_pathname_application_special(s1, sizeof(s1), + APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH); + fill_pathname_join(s, + s1, "Roboto-Condensed.ttf", len); + } +#endif + break; + case APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH: +#ifdef HAVE_ZARCH + { + settings_t *settings = config_get_ptr(); + fill_pathname_join(s, + settings->directory.assets, + "zarch", + len); + } +#endif + break; case APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS: #ifdef HAVE_XMB { diff --git a/file_path_special.h b/file_path_special.h index b853501139..d7b0e37f1e 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -31,7 +31,10 @@ enum application_special_type APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB, APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG, APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS, - APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT + APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT, + APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH, + APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_FONT, + APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS }; bool fill_pathname_application_data(char *s, size_t len); diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 0c44ed33c6..30864b1afd 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -30,12 +30,14 @@ #include #include #include +#include #include "menu_generic.h" #include "../../config.def.h" #include "../../list_special.h" +#include "../../file_path_special.h" #include "../menu_driver.h" #include "../menu_animation.h" @@ -170,18 +172,12 @@ static enum zarch_layout_type zarch_layout; static void zarch_zui_font(void) { menu_display_ctx_font_t font_info; - char mediapath[PATH_MAX_LENGTH] = {0}; char fontpath[PATH_MAX_LENGTH] = {0}; - settings_t *settings = config_get_ptr(); int font_size = menu_display_get_font_size(); - fill_pathname_join( - mediapath, - settings->directory.assets, - "zarch", - sizeof(mediapath)); - fill_pathname_join(fontpath, - mediapath, "Roboto-Condensed.ttf", sizeof(fontpath)); + fill_pathname_application_special( + fontpath, sizeof(fontpath), + APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_FONT); font_info.path = fontpath; font_info.size = font_size;