From 4799b841b7abeeaa58967c612045e550b9f09917 Mon Sep 17 00:00:00 2001 From: friedkeenan Date: Wed, 12 Sep 2018 20:15:01 -0500 Subject: [PATCH] Load config from /config/nx-hbmenu/themes/theme.cfg It will load from "config/nx-hbmenu/themes/theme.cfg" if you're using the PC version --- common/theme.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/theme.c b/common/theme.c index 9b4af96..459159b 100644 --- a/common/theme.c +++ b/common/theme.c @@ -46,6 +46,14 @@ void themeStartup(ThemePreset preset) { .hbmenuLogoImage = hbmenu_logo_dark_bin }; + char tmp_path[PATH_MAX] = {0}; + + #ifdef __SWITCH__ + tmp_path[0] = '/'; + #endif + + strncat(tmp_path, "config/nx-hbmenu/themes/theme.cfg", sizeof(tmp_path)-2); + theme_t *themeDefault; config_t cfg = {0}; config_init(&cfg); @@ -53,7 +61,7 @@ void themeStartup(ThemePreset preset) { color_t text, frontWave, middleWave, backWave, background, highlight, separator; int waveBlending; const char *AText, *BText; - bool good_cfg = config_read_file(&cfg, "/hbtheme.cfg"); + bool good_cfg = config_read_file(&cfg, tmp_path); switch (preset) { case THEME_PRESET_LIGHT: