From 2a2128c80eabfe4999d2420ed428ccd8bc015e5e Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Sun, 23 Sep 2018 18:49:34 -0500 Subject: [PATCH 01/11] tested building on mac osx, added to .gitignore and make clean for files generated on osx --- Makefile.pc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.pc b/Makefile.pc index 5c6c373..89360c4 100644 --- a/Makefile.pc +++ b/Makefile.pc @@ -25,6 +25,7 @@ test : pc_main/main.cpp pc_main/pc_launch.c \ common/netloader.c \ build_pc/invalid_icon.bin.o build_pc/folder_icon.bin.o \ build_pc/hbmenu_logo_light.bin.o build_pc/hbmenu_logo_dark.bin.o \ + build_pc/theme_icon_dark.bin.o build_pc/theme_icon_light.bin.o \ #build_pc/tahoma24.o build_pc/tahoma12.o build_pc/interuimedium20.o build_pc/interuimedium30.o build_pc/interuiregular14.o build_pc/interuiregular18.o gcc -Wall -O2 -g -DVERSION=\"v$(APP_VERSION)\" $(EXTRA_CFLAGS) `pkg-config freetype2 --cflags` $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ `pkg-config freetype2 --libs` -lm -lz -lconfig $(EXTRA_LDFLAGS) -I. -iquote $(DEVKITPRO)/libnx/include -Ibuild_pc -g -o $@ @@ -78,16 +79,16 @@ build_pc/hbmenu_logo_dark.bin.o : data/hbmenu_logo_dark.bin @echo $(notdir $<) @$(bin2o) -build_pc/hbmenu_logo_light.bin.o : data/theme_icon_light.bin +build_pc/theme_icon_light.bin.o : data/theme_icon_light.bin mkdir -p $(dir $@) @echo $(notdir $<) @$(bin2o) -build_pc/hbmenu_logo_dark.bin.o : data/theme_icon_dark.bin +build_pc/theme_icon_dark.bin.o : data/theme_icon_dark.bin mkdir -p $(dir $@) @echo $(notdir $<) @$(bin2o) clean: - rm -rf build_pc/ test + rm -rf build_pc/ test *_bin.h test.* From 3abb799c61c10ba3809d511510d15f937463c42a Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Sun, 23 Sep 2018 18:59:41 -0500 Subject: [PATCH 02/11] fixed spaces --- common/menu-entry.c | 2 +- common/menu.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/common/menu-entry.c b/common/menu-entry.c index a5a7635..59f5741 100644 --- a/common/menu-entry.c +++ b/common/menu-entry.c @@ -309,7 +309,7 @@ bool menuEntryLoad(menuEntry_s* me, const char* name, bool shortcut) { strncpy(me->name, name, sizeof(me->name)-1); if(!config_setting_lookup_string(themeInfo, "author", &author)) author = textGetString(StrId_DefaultPublisher); - if(!config_setting_lookup_string(themeInfo, "version", &version))\ + if(!config_setting_lookup_string(themeInfo, "version", &version)) version = "1.0.0"; } } diff --git a/common/menu.c b/common/menu.c index 6e24854..dce8392 100644 --- a/common/menu.c +++ b/common/menu.c @@ -14,8 +14,7 @@ char *menuGetRootPath() { return rootPath; } -void launchMenuEntryTask(menuEntry_s* arg) -{ +void launchMenuEntryTask(menuEntry_s* arg) { menuEntry_s* me = arg; if (me->type == ENTRY_TYPE_FOLDER) menuScan(me->path); @@ -40,24 +39,24 @@ void launchMenuNetloaderTask() { if(netloader_activate() == 0) hbmenu_state = HBMENU_NETLOADER_ACTIVE; } -void launchMenuBackTask() -{ +void launchMenuBackTask() { if(hbmenu_state == HBMENU_NETLOADER_ACTIVE) { netloader_deactivate(); hbmenu_state = HBMENU_DEFAULT; - }else if(hbmenu_state == HBMENU_THEME_MENU){ + } + else if(hbmenu_state == HBMENU_THEME_MENU) { hbmenu_state = HBMENU_DEFAULT; menuScan(rootPath); } - else { + else { menuScan(".."); } } -void launchApplyThemeTask(menuEntry_s* arg){ +void launchApplyThemeTask(menuEntry_s* arg) { config_t cfg = {0}; config_init(&cfg); - if(!config_read_file(&cfg, arg->path)){ + if(!config_read_file(&cfg, arg->path)) { menuCreateMsgBox(780, 300, "Something went wrong, and the theme could not be loaded!"); return; } @@ -67,7 +66,7 @@ void launchApplyThemeTask(menuEntry_s* arg){ #endif strncat(tmp_path, "config/nx-hbmenu/theme.cfg", sizeof(tmp_path)-2); - if(!config_write_file(&cfg, tmp_path)){ + if(!config_write_file(&cfg, tmp_path)) { menuCreateMsgBox(780, 300, "Something went wrong, and the theme could not be applied!"); return; } From f7d1f7a834ad7cf7c961f45bd6e53a71aa39ce07 Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Sun, 23 Sep 2018 19:01:51 -0500 Subject: [PATCH 03/11] added git ignore changes --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e811257..a0a1943 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ build *.pfs0 *.nacp *.nro +test.* +*_bin.h +switch From 59f2e4d1ed87e3442328f3dce9cec3108504373e Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Sun, 23 Sep 2018 19:07:23 -0500 Subject: [PATCH 04/11] fixed aligment and added a newline after temp_path within launchApplyThemeTask func, and newline before --- common/menu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/menu.c b/common/menu.c index dce8392..9000f3c 100644 --- a/common/menu.c +++ b/common/menu.c @@ -53,14 +53,17 @@ void launchMenuBackTask() { } } + void launchApplyThemeTask(menuEntry_s* arg) { config_t cfg = {0}; config_init(&cfg); + if(!config_read_file(&cfg, arg->path)) { menuCreateMsgBox(780, 300, "Something went wrong, and the theme could not be loaded!"); return; } - char tmp_path[PATH_MAX] = {0}; + char tmp_path[PATH_MAX] = {0}; + #ifdef __SWITCH__ tmp_path[0] = '/'; #endif From f89e33121ff1d77d66d34b20ab3830f50dad6639 Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 12:32:38 -0500 Subject: [PATCH 05/11] got rid of redundent code in menu-entry.c file --- common/menu-entry.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/menu-entry.c b/common/menu-entry.c index 59f5741..09060af 100644 --- a/common/menu-entry.c +++ b/common/menu-entry.c @@ -307,10 +307,8 @@ bool menuEntryLoad(menuEntry_s* me, const char* name, bool shortcut) { if (themeInfo != NULL) { if(config_setting_lookup_string(themeInfo, "name", &name)) strncpy(me->name, name, sizeof(me->name)-1); - if(!config_setting_lookup_string(themeInfo, "author", &author)) - author = textGetString(StrId_DefaultPublisher); - if(!config_setting_lookup_string(themeInfo, "version", &version)) - version = "1.0.0"; + config_setting_lookup_string(themeInfo, "author", &author); + config_setting_lookup_string(themeInfo, "version", &version); } } From 26acfddb3826f0ae4198ad228040b781f1f1b6ea Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 12:38:00 -0500 Subject: [PATCH 06/11] out newline before tmp_path in menu.c --- common/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/menu.c b/common/menu.c index 9000f3c..18ada28 100644 --- a/common/menu.c +++ b/common/menu.c @@ -62,8 +62,8 @@ void launchApplyThemeTask(menuEntry_s* arg) { menuCreateMsgBox(780, 300, "Something went wrong, and the theme could not be loaded!"); return; } - char tmp_path[PATH_MAX] = {0}; + char tmp_path[PATH_MAX] = {0}; #ifdef __SWITCH__ tmp_path[0] = '/'; #endif From 3bc32177a5e6659085619f34c56a5c20017b299c Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 16:12:40 -0500 Subject: [PATCH 07/11] made requested changes by yellows8 --- common/common.h | 4 ++-- common/font.c | 22 ++++++++++++---------- common/menu-entry.c | 1 + common/menu-list.c | 2 +- common/menu.c | 17 +++++++---------- common/theme.c | 6 +++++- common/theme.h | 6 +++--- nx_main/main.c | 3 ++- 8 files changed, 33 insertions(+), 28 deletions(-) diff --git a/common/common.h b/common/common.h index 0536dc6..a66c06a 100644 --- a/common/common.h +++ b/common/common.h @@ -153,8 +153,8 @@ void DrawPixel(uint32_t x, uint32_t y, color_t clr); void DrawText(u32 font, uint32_t x, uint32_t y, color_t clr, const char* text); void DrawTextTruncate(u32 font, uint32_t x, uint32_t y, color_t clr, const char* text, uint32_t max_width, const char* end_text); void GetTextDimensions(u32 font, const char* text, uint32_t* width_out, uint32_t* height_out); -uint32_t getXCoordinate(u32 font,uint32_t rX, const char* text,const char align); -uint32_t getYCoordinate(u32 font,uint32_t rY, const char* text,const char align); +uint32_t getTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align); +uint32_t getTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align); bool fontInitialize(void); void fontExit(); diff --git a/common/font.c b/common/font.c index 3c5a2c2..64c6ac9 100644 --- a/common/font.c +++ b/common/font.c @@ -377,46 +377,48 @@ void fontExit() } /*Automatically gives you the desired x-coordinate - *based on the string length and desired alignmenr + *based on the string length and desired alignment *rY=reference point... where to align around - *align='t','b','c' translates too (top,bottom,center) + *align='t','b','c' translates to (top,bottom,center) *'t' aligned, top of text aligns with rY, *you get the rest.... */ -uint32_t getYCoordinate(u32 font,uint32_t rY,const char* text, const char align){ +uint32_t getTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align){ uint32_t height_o,width; GetTextDimensions(font,text,&width,&height_o); uint32_t height = (uint32_t)height_o; uint32_t fC = (rY-height); + switch(align){ case 't': default: return rY; case 'c': - return (rY+(height/2U)); + return (rY+(height>>1));//>>1 is a bitwise shift for dividing by 2 case 'b': - if(fC<=0U) return 0U; + if(fC<=0) return 0; else return fC; } } /*Automatically gives you the desired x-coordinate - *based on the string length and desired alignmenr + *based on the string length and desired alignment *rX=reference point... where to align around *text=string you want to display - *align='r','l','c' translates too (right,left,center) + *align='r','l','c' translates to (right,left,center) *'r' aligned, rX location = end of string, you get the rest... */ -uint32_t getXCoordinate(u32 font,uint32_t rX, const char* text ,const char align){ +uint32_t getTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align){ uint32_t height,width_o; GetTextDimensions(font,text,&width_o,&height); uint32_t fC = (rX-width_o); + switch(align){ case 'r': - if(fC<0U) return 0U; + if(fC<0) return 0; else return fC; case 'c': - return (rX+(width_o/2U)); + return (rX+(width_o>>1));//>>1 is a bitwise shift for dividing by 2 case 'l': default: return rX; diff --git a/common/menu-entry.c b/common/menu-entry.c index 09060af..f783807 100644 --- a/common/menu-entry.c +++ b/common/menu-entry.c @@ -294,6 +294,7 @@ bool menuEntryLoad(menuEntry_s* me, const char* name, bool shortcut) { /*if (shortcut) shortcutFree(&sc);*/ } + if (me->type == ENTRY_TYPE_THEME) { config_t cfg = {0}; config_init(&cfg); diff --git a/common/menu-list.c b/common/menu-list.c index 9cc2c53..2b89099 100644 --- a/common/menu-list.c +++ b/common/menu-list.c @@ -181,7 +181,7 @@ int themeMenuScan(const char* target) { strncpy(me->path, tmp_path, sizeof(me->path)-1); me->path[sizeof(me->path)-1] = 0; - if (menuEntryLoad(me,dp->d_name, shortcut)) + if (menuEntryLoad(me, dp->d_name, shortcut)) menuAddEntry(me); else menuDeleteEntry(me); diff --git a/common/menu.c b/common/menu.c index 18ada28..362747d 100644 --- a/common/menu.c +++ b/common/menu.c @@ -74,7 +74,7 @@ void launchApplyThemeTask(menuEntry_s* arg) { return; } config_destroy(&cfg); - themeStartup(globalPreset); + themeStartup(themeGlobalPreset); computeFrontGradient(themeCurrent.frontWaveColor, 280); } @@ -214,7 +214,7 @@ static void drawEntry(menuEntry_s* me, int off_x, int is_active) { } else if (me->type == ENTRY_TYPE_THEME){ smallimg = theme_icon_small; - if(globalPreset == THEME_PRESET_DARK) + if(themeGlobalPreset == THEME_PRESET_DARK) largeimg = theme_icon_dark_bin; else largeimg = theme_icon_light_bin; } @@ -307,6 +307,10 @@ void menuStartup() { folder_icon_small = downscaleImg(folder_icon_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); invalid_icon_small = downscaleImg(invalid_icon_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); + if(themeGlobalPreset == THEME_PRESET_DARK) + theme_icon_small = downscaleImg(theme_icon_dark_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); + else + theme_icon_small = downscaleImg(theme_icon_light_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); computeFrontGradient(themeCurrent.frontWaveColor, 280); //menuCreateMsgBox(780, 300, "This is a test"); } @@ -319,13 +323,6 @@ void themeMenuStartup() { snprintf(tmp_path, sizeof(tmp_path)-1, "%s%s%s%s%s%s",DIRECTORY_SEPARATOR, "config", DIRECTORY_SEPARATOR, "nx-hbmenu" , DIRECTORY_SEPARATOR, "themes"); themeMenuScan(tmp_path); - if(globalPreset == THEME_PRESET_DARK) - theme_icon_small = downscaleImg(theme_icon_dark_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); - else - theme_icon_small = downscaleImg(theme_icon_light_bin, 256, 256, 140, 140, IMAGE_MODE_RGB24); - - computeFrontGradient(themeCurrent.frontWaveColor, 280); - //menuCreateMsgBox(780, 300, "This is a test"); } color_t waveBlendAdd(color_t a, color_t b, float alpha) { @@ -499,7 +496,7 @@ void menuLoop() { if(active_entry != NULL) { if (active_entry->type == ENTRY_TYPE_THEME) { - int getX = getXCoordinate(interuiregular18, 1180, textGetString(StrId_Actions_Theme_Menu), 'r'); + int getX = getTextXCoordinate(interuiregular18, 1180, textGetString(StrId_Actions_Theme_Menu), 'r'); DrawText(interuiregular18, getX, 0 + 47, themeCurrent.textColor, textGetString(StrId_Actions_Theme_Menu)); DrawText(fontscale7, 1280 - 126 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, themeCurrent.buttonAText); DrawText(interuiregular18, 1280 - 90 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, textGetString(StrId_Actions_Apply)); diff --git a/common/theme.c b/common/theme.c index 836a31f..d841a6b 100644 --- a/common/theme.c +++ b/common/theme.c @@ -6,6 +6,8 @@ #include "hbmenu_logo_light_bin.h" #include "hbmenu_logo_dark_bin.h" +theme_t themeCurrent; + bool colorFromSetting(config_setting_t *rgba, color_t *col) { if(rgba == NULL) return false; @@ -14,7 +16,7 @@ bool colorFromSetting(config_setting_t *rgba, color_t *col) { } void themeStartup(ThemePreset preset) { - globalPreset = preset; + themeGlobalPreset = preset; theme_t themeLight = (theme_t) { .textColor = MakeColor(0, 0, 0, 255), .frontWaveColor = MakeColor(100, 212, 250, 255), @@ -67,6 +69,7 @@ void themeStartup(ThemePreset preset) { int waveBlending; const char *AText, *BText; bool good_cfg = config_read_file(&cfg, tmp_path); + switch (preset) { case THEME_PRESET_LIGHT: default: @@ -81,6 +84,7 @@ void themeStartup(ThemePreset preset) { theme = config_lookup(&cfg, "darkTheme"); break; } + if (good_cfg) { if (theme != NULL) { if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text)) diff --git a/common/theme.h b/common/theme.h index 3931508..1f79f5f 100644 --- a/common/theme.h +++ b/common/theme.h @@ -30,8 +30,8 @@ typedef enum bool colorFromSetting(config_setting_t *rgba, color_t *col); -void themeStartup(ThemePreset preset); +extern void themeStartup(ThemePreset preset); -theme_t themeCurrent; +extern theme_t themeCurrent; -ThemePreset globalPreset; +ThemePreset themeGlobalPreset; diff --git a/nx_main/main.c b/nx_main/main.c index 7748579..40a9600 100644 --- a/nx_main/main.c +++ b/nx_main/main.c @@ -32,7 +32,7 @@ int main(int argc, char **argv) appletSetScreenShotPermission(1); - ColorSetId theme; + ColorSetId theme; rc = setsysInitialize(); if (R_FAILED(rc)) fatalSimple(-5); @@ -40,6 +40,7 @@ int main(int argc, char **argv) rc = plInitialize(); if (R_FAILED(rc)) fatalSimple(-6); + themeStartup((ThemePreset)theme); textInit(); menuStartup(); From b9281534cc80bed36017e704135e7450440270e2 Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 16:18:52 -0500 Subject: [PATCH 08/11] updated language for theme menu --- common/language.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/language.c b/common/language.c index c315fcd..2e848c2 100644 --- a/common/language.c +++ b/common/language.c @@ -322,11 +322,11 @@ const char* const g_strings[StrId_Max][16] = [StrId_Actions_Theme_Menu] = { - STR_EN("Theme Switcher V1.0"), - STR_ES("Versión 1,0 del cambiador de tema"), - STR_JP("テーマスイッチャー版1.0"), - STR_KO("테마 스위처 에디션 1.0"), - STR_TW("主题切换器版本1。0"), + STR_EN("Theme Menu V1.0"), + STR_ES("Tema menu edición 1,0"), + STR_JP("テーマメニュー版1.0"), + STR_KO("테마 메뉴 에디션 1.0"), + STR_TW("主题菜单编辑1。0"), }, /*[StrId_Reboot] = { From 1afb09794cb4c164084425d005313e45bee606df Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 16:25:47 -0500 Subject: [PATCH 09/11] fixed capitalization of functions to match others --- common/common.h | 4 ++-- common/font.c | 4 ++-- common/menu.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/common.h b/common/common.h index a66c06a..0207f37 100644 --- a/common/common.h +++ b/common/common.h @@ -153,8 +153,8 @@ void DrawPixel(uint32_t x, uint32_t y, color_t clr); void DrawText(u32 font, uint32_t x, uint32_t y, color_t clr, const char* text); void DrawTextTruncate(u32 font, uint32_t x, uint32_t y, color_t clr, const char* text, uint32_t max_width, const char* end_text); void GetTextDimensions(u32 font, const char* text, uint32_t* width_out, uint32_t* height_out); -uint32_t getTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align); -uint32_t getTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align); +uint32_t GetTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align); +uint32_t GetTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align); bool fontInitialize(void); void fontExit(); diff --git a/common/font.c b/common/font.c index 64c6ac9..9f96627 100644 --- a/common/font.c +++ b/common/font.c @@ -383,7 +383,7 @@ void fontExit() *'t' aligned, top of text aligns with rY, *you get the rest.... */ -uint32_t getTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align){ +uint32_t GetTextYCoordinate(u32 font, uint32_t rY, const char* text, const char align) { uint32_t height_o,width; GetTextDimensions(font,text,&width,&height_o); uint32_t height = (uint32_t)height_o; @@ -408,7 +408,7 @@ uint32_t getTextYCoordinate(u32 font, uint32_t rY, const char* text, const char *align='r','l','c' translates to (right,left,center) *'r' aligned, rX location = end of string, you get the rest... */ -uint32_t getTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align){ +uint32_t GetTextXCoordinate(u32 font, uint32_t rX, const char* text, const char align) { uint32_t height,width_o; GetTextDimensions(font,text,&width_o,&height); uint32_t fC = (rX-width_o); diff --git a/common/menu.c b/common/menu.c index 362747d..cd3d8ed 100644 --- a/common/menu.c +++ b/common/menu.c @@ -496,7 +496,7 @@ void menuLoop() { if(active_entry != NULL) { if (active_entry->type == ENTRY_TYPE_THEME) { - int getX = getTextXCoordinate(interuiregular18, 1180, textGetString(StrId_Actions_Theme_Menu), 'r'); + int getX = GetTextXCoordinate(interuiregular18, 1180, textGetString(StrId_Actions_Theme_Menu), 'r'); DrawText(interuiregular18, getX, 0 + 47, themeCurrent.textColor, textGetString(StrId_Actions_Theme_Menu)); DrawText(fontscale7, 1280 - 126 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, themeCurrent.buttonAText); DrawText(interuiregular18, 1280 - 90 - 30 - 32, 720 - 47 + 24, themeCurrent.textColor, textGetString(StrId_Actions_Apply)); From 8f20c9a0e4e4576510e32ad84f4820067fe485af Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 16:30:16 -0500 Subject: [PATCH 10/11] made suggested changes --- common/language.c | 10 +++++----- common/theme.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/language.c b/common/language.c index 2e848c2..2d61e0e 100644 --- a/common/language.c +++ b/common/language.c @@ -322,11 +322,11 @@ const char* const g_strings[StrId_Max][16] = [StrId_Actions_Theme_Menu] = { - STR_EN("Theme Menu V1.0"), - STR_ES("Tema menu edición 1,0"), - STR_JP("テーマメニュー版1.0"), - STR_KO("테마 메뉴 에디션 1.0"), - STR_TW("主题菜单编辑1。0"), + STR_EN("Theme Menu"), + STR_ES("Menú temático"), + STR_JP("テーマメニュー"), + STR_KO("테마 메뉴"), + STR_TW("主题菜单"), }, /*[StrId_Reboot] = { diff --git a/common/theme.c b/common/theme.c index d841a6b..fde615e 100644 --- a/common/theme.c +++ b/common/theme.c @@ -7,6 +7,7 @@ #include "hbmenu_logo_dark_bin.h" theme_t themeCurrent; +ThemePreset themeGlobalPreset; bool colorFromSetting(config_setting_t *rgba, color_t *col) { if(rgba == NULL) From 03503d8328472689a04559bf20b400c83b81d4c6 Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Mon, 24 Sep 2018 16:56:13 -0500 Subject: [PATCH 11/11] updated changes --- common/theme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/theme.h b/common/theme.h index 1f79f5f..abdcfd4 100644 --- a/common/theme.h +++ b/common/theme.h @@ -30,8 +30,8 @@ typedef enum bool colorFromSetting(config_setting_t *rgba, color_t *col); -extern void themeStartup(ThemePreset preset); +void themeStartup(ThemePreset preset); extern theme_t themeCurrent; -ThemePreset themeGlobalPreset; +extern ThemePreset themeGlobalPreset;