Added support for SVG separatorlogos

This commit is contained in:
Manuel Reimer 2014-11-12 17:05:36 +01:00
parent d7aa09fec3
commit 7a69d868c4

View File

@ -151,7 +151,8 @@ bool cImageCache::SeparatorLogoExists(string name) {
string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str()); string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str());
string nameLower = StrToLowerCase(name.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) { 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) { bool cImageCache::LoadSeparatorLogo(string name) {
string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str()); string separatorPath = *cString::sprintf("%sseparatorlogos/", logoPath.c_str());
string nameLower = StrToLowerCase(name.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) { bool cImageCache::LoadSkinpart(string name) {