diff options
author | ace20022 <ace20022@xbmc.org> | 2015-10-07 17:18:18 +0200 |
---|---|---|
committer | ace20022 <ace20022@xbmc.org> | 2015-10-07 17:18:18 +0200 |
commit | ce09e5a83458cde17fc39336cad16738d8e1f7e6 (patch) | |
tree | e6088be55ac9a19a1a752afd7a16dd62810b43eb | |
parent | 3628fd9c353b944c5c2f2bdbbfb39b7be7cc19c5 (diff) |
[guilib][gif] Make animated gifs loadable for any kind of textures, e.g., posters.
-rw-r--r-- | xbmc/guilib/GUITexture.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/guilib/GUITexture.cpp b/xbmc/guilib/GUITexture.cpp index 5e719217a7..5a6ffa0fe5 100644 --- a/xbmc/guilib/GUITexture.cpp +++ b/xbmc/guilib/GUITexture.cpp @@ -23,6 +23,7 @@ #include "TextureManager.h" #include "GUILargeTextureManager.h" #include "utils/MathUtils.h" +#include "utils/StringUtils.h" CTextureInfo::CTextureInfo() { @@ -657,6 +658,14 @@ bool CGUITextureBase::SetFileName(const std::string& filename) // filenames mid-animation FreeResources(); m_info.filename = filename; + + // disable large loader and cache for gifs + if (StringUtils::EndsWithNoCase(m_info.filename, ".gif")) + { + m_info.useLarge = false; + SetUseCache(false); + } + // Don't allocate resources here as this is done at render time return true; } |