From 30aa1477719849e56abb3624adf2eb4c3d443718 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Sat, 27 Aug 2016 10:41:04 +0200 Subject: [add] svdrp command to remove logo from cache --- imagecache.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'imagecache.c') 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 #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++ ) { -- cgit v1.2.3