diff options
Diffstat (limited to 'imagecache.c')
-rw-r--r-- | imagecache.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/imagecache.c b/imagecache.c index 61606476..639c3ec9 100644 --- a/imagecache.c +++ b/imagecache.c @@ -1,6 +1,6 @@ #include "imagecache.h" #include "config.h" - +#include <libgen.h> #include "displaychannel.h" #include "displaymenu.h" @@ -15,7 +15,7 @@ cImageCache::cImageCache() { } cImageCache::~cImageCache() { - + } void cImageCache::Create(void) { @@ -38,6 +38,23 @@ void cImageCache::Clear(void) { InsertIndex = 0; } +bool cImageCache::RemoveFromCache( std::string Name ) { + bool found = false; + for(int index = 0; index < MAX_IMAGE_CACHE; index++ ) { + char *bname; + bname = basename( (char *)CacheName[index].c_str() ); + if( !strcmp(bname, Name.c_str()) ) { + found = true; + dsyslog("skinflatplus RemoveFromCache - %s", CacheName[index].c_str() ); + CacheImage[index] = NULL; + CacheName[index] = ""; + CacheWidth[index] = -1; + CacheHeight[index] = -1; + } + } + return found; +} + cImage* cImageCache::GetImage(std::string Name, int Width, int Height) { //dsyslog("imagecache search for image %s Width %d Height %d", Name.c_str(), Width, Height); for(int index = 0; index < MAX_IMAGE_CACHE; index++ ) { |