From 7a69d868c422218817f1c92a6666ee6c83825d23 Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Wed, 12 Nov 2014 17:05:36 +0100 Subject: [PATCH] Added support for SVG separatorlogos --- libcore/imagecache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcore/imagecache.c b/libcore/imagecache.c index 7eabbca..369322e 100644 --- a/libcore/imagecache.c +++ b/libcore/imagecache.c @@ -151,7 +151,8 @@ bool cImageCache::SeparatorLogoExists(string name) { string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str()); string nameLower = StrToLowerCase(name.c_str()); - return FileExists(separatorPath, nameLower, "png"); + return (FileExists(separatorPath, nameLower, "svg") || + FileExists(separatorPath, nameLower, "png")); } void cImageCache::CacheIcon(eImageType type, string name, int width, int height) { @@ -336,7 +337,10 @@ bool cImageCache::LoadLogo(const cChannel *channel) { bool cImageCache::LoadSeparatorLogo(string name) { string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str()); string nameLower = StrToLowerCase(name.c_str()); - return LoadImage(separatorPath, nameLower.c_str(), "png"); + if (FileExists(separatorPath, nameLower.c_str(), "svg")) + return LoadImage(separatorPath, nameLower.c_str(), "svg"); + else + return LoadImage(separatorPath, nameLower.c_str(), "png"); } bool cImageCache::LoadSkinpart(string name) {