mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 21:33:59 +02:00
- add some more verbose info on font searching and cleanup a leak
This commit is contained in:
@@ -346,6 +346,7 @@ const char* findFont(const char *firstFontToTry,const char *firstFontFamilyToTry
|
|||||||
path = filename; \
|
path = filename; \
|
||||||
if( font == NULL && path != NULL && strlen(path) > 0 && fileExists(path) == true ) { \
|
if( font == NULL && path != NULL && strlen(path) > 0 && fileExists(path) == true ) { \
|
||||||
font = strdup(path); \
|
font = strdup(path); \
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 candidate font file [%s]\n",(font != NULL ? font : "null")); \
|
||||||
} \
|
} \
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 Searching for font file [%s] result [%s]\n",(path != NULL ? path : "null"),(font != NULL ? font : "null")); \
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#1 Searching for font file [%s] result [%s]\n",(path != NULL ? path : "null"),(font != NULL ? font : "null")); \
|
||||||
if( font != NULL && fontFamily != NULL && strlen(fontFamily) > 0) { \
|
if( font != NULL && fontFamily != NULL && strlen(fontFamily) > 0) { \
|
||||||
@@ -353,7 +354,9 @@ const char* findFont(const char *firstFontToTry,const char *firstFontFamilyToTry
|
|||||||
if(fileFound != "") { \
|
if(fileFound != "") { \
|
||||||
path = fileFound.c_str(); \
|
path = fileFound.c_str(); \
|
||||||
if( font != NULL && path && strlen(path) > 0 && fileExists(path) == true ) { \
|
if( font != NULL && path && strlen(path) > 0 && fileExists(path) == true ) { \
|
||||||
|
free((void*)font); \
|
||||||
font = strdup(path); \
|
font = strdup(path); \
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#2 candidate font file [%s]\n",(font != NULL ? font : "null")); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#2 Searching for font family [%s] result [%s]\n",(fontFamily != NULL ? fontFamily : "null"),(font != NULL ? font : "null")); \
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("#2 Searching for font family [%s] result [%s]\n",(fontFamily != NULL ? fontFamily : "null"),(font != NULL ? font : "null")); \
|
||||||
|
Reference in New Issue
Block a user