got rid of void* cast when freeing, got rid of comments asking questions, got rid of superflous cast
This commit is contained in:
parent
42df5cf5e0
commit
2f1e6ad402
@ -119,7 +119,7 @@ static inline char* removeExtension(const char* str){
|
|||||||
*copy = *p;
|
*copy = *p;
|
||||||
copy++;
|
copy++;
|
||||||
}
|
}
|
||||||
return (char*)copyHead;
|
return copyHead;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void replaceCharacter(char* str, char orig, char repl){
|
static inline void replaceCharacter(char* str, char orig, char repl){
|
||||||
|
@ -15,8 +15,8 @@ bool colorFromSetting(config_setting_t *rgba, color_t *col) {
|
|||||||
|
|
||||||
void themeStartup(ThemePreset preset) {
|
void themeStartup(ThemePreset preset) {
|
||||||
globalPreset = preset;
|
globalPreset = preset;
|
||||||
char* buttonAText = calloc(7,sizeof(char));/*Must initialize the character arrays on the heap*/
|
char* buttonAText = calloc(7,sizeof(char));
|
||||||
char* buttonBText = calloc(7,sizeof(char));/*so that they are not destroyed whenever themeStartup function ends*/
|
char* buttonBText = calloc(7,sizeof(char));
|
||||||
switch (preset) {
|
switch (preset) {
|
||||||
case THEME_PRESET_LIGHT:
|
case THEME_PRESET_LIGHT:
|
||||||
default:
|
default:
|
||||||
@ -39,8 +39,8 @@ void themeStartup(ThemePreset preset) {
|
|||||||
.borderColor = MakeColor(255,255,255,255),
|
.borderColor = MakeColor(255,255,255,255),
|
||||||
.borderTextColor = MakeColor(64,64,64,255),
|
.borderTextColor = MakeColor(64,64,64,255),
|
||||||
.enableWaveBlending = 0,
|
.enableWaveBlending = 0,
|
||||||
.buttonAText = buttonAText,/*setting the buttonAText = "\uE0E0" directly allocates the literal on the stack */
|
.buttonAText = buttonAText,
|
||||||
.buttonBText = buttonBText,/*and sets the buttonAText to point to the address of the literal which is why calloc is used above*/
|
.buttonBText = buttonBText,
|
||||||
//.buttonAImage = button_a_light_bin,
|
//.buttonAImage = button_a_light_bin,
|
||||||
//.buttonBImage = button_b_light_bin,
|
//.buttonBImage = button_b_light_bin,
|
||||||
.hbmenuLogoImage = hbmenu_logo_light_bin
|
.hbmenuLogoImage = hbmenu_logo_light_bin
|
||||||
@ -67,10 +67,10 @@ void themeStartup(ThemePreset preset) {
|
|||||||
char tmp_path[PATH_MAX] = {0};
|
char tmp_path[PATH_MAX] = {0};
|
||||||
|
|
||||||
#ifdef __SWITCH__
|
#ifdef __SWITCH__
|
||||||
tmp_path[0] = '/';/*will this work on the windows version?*/
|
tmp_path[0] = '/';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
strncat(tmp_path, "config/nx-hbmenu/themes/theme.cfg", sizeof(tmp_path)-2);/*Same thing here? will it work on windows?*/
|
strncat(tmp_path, "config/nx-hbmenu/themes/theme.cfg", sizeof(tmp_path)-2);
|
||||||
|
|
||||||
theme_t *themeDefault;
|
theme_t *themeDefault;
|
||||||
config_t cfg = {0};
|
config_t cfg = {0};
|
||||||
|
Loading…
Reference in New Issue
Block a user