diff options
Diffstat (limited to 'imageloader.c')
-rw-r--r-- | imageloader.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/imageloader.c b/imageloader.c index 1676175..058affa 100644 --- a/imageloader.c +++ b/imageloader.c @@ -38,10 +38,18 @@ bool cImageLoader::LoadIcon(const char *cIcon, int size) { return false; bool success = false; if (config.iconPathSet) { - success = LoadImage(cString(cIcon), config.iconPath, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPath, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPath, "png"); + } } if (!success) { - success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPathDefault, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + } } if (!success) return false; @@ -55,10 +63,18 @@ bool cImageLoader::LoadIcon(const char *cIcon, int width, int height) { return false; bool success = false; if (config.iconPathSet) { - success = LoadImage(cString(cIcon), config.iconPath, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPath, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPath, "png"); + } } if (!success) { - success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + cString iconThemePath = cString::sprintf("%s%s/", *config.iconPathDefault, Setup.OSDTheme); + success = LoadImage(cString(cIcon), iconThemePath, "png"); + if (!success) { + success = LoadImage(cString(cIcon), config.iconPathDefault, "png"); + } } if (!success) return false; |