diff options
Diffstat (limited to 'glcdskin')
-rw-r--r-- | glcdskin/cache.c | 3 | ||||
-rw-r--r-- | glcdskin/function.c | 2 | ||||
-rw-r--r-- | glcdskin/object.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/glcdskin/cache.c b/glcdskin/cache.c index a0b2929..f0543d9 100644 --- a/glcdskin/cache.c +++ b/glcdskin/cache.c @@ -17,6 +17,8 @@ #include <stdlib.h> #include <string.h> +#include <syslog.h> + #include "cache.h" #include "skin.h" @@ -102,6 +104,7 @@ cImage * cImageCache::Get(const std::string & path, uint16_t & scalew, uint16_t item = LoadImage(path, scalew, scaleh); if (item) { + syslog(LOG_INFO, "INFO: graphlcd: successfully loaded image '%s'\n", path.c_str()); if (images.size() == size) { images.erase(oldest); diff --git a/glcdskin/function.c b/glcdskin/function.c index 6d96c57..2593f70 100644 --- a/glcdskin/function.c +++ b/glcdskin/function.c @@ -176,7 +176,7 @@ bool cSkinFunction::Parse(const std::string & Text) { if (inExpr == 0) { - syslog(LOG_ERR, "ERROR: Unmatched '%c' in expression", *ptr); + syslog(LOG_ERR, "ERROR: Unmatched '%c' in expression (%s)", *ptr, Text.c_str()); return false; } diff --git a/glcdskin/object.c b/glcdskin/object.c index 7e99092..204b0d4 100644 --- a/glcdskin/object.c +++ b/glcdskin/object.c @@ -484,9 +484,9 @@ void cSkinObject::Render(GLCD::cBitmap * screen) uint16_t xoff = 0; uint16_t yoff = 0; if (scalew || scaleh) { - if (image->Width() < Size().w) { + if (image->Width() < (uint16_t)Size().w) { xoff = (Size().w - image->Width() ) / 2; - } else if (image->Height() < Size().h) { + } else if (image->Height() < (uint16_t)Size().h) { yoff = (Size().h - image->Height() ) / 2; } } |