fixed: Ignore extension case when checking for our jpeg loader + also consider .jpeg...
authorarnova <arnova@void.org>
Wed, 12 Dec 2012 17:38:18 +0000 (18:38 +0100)
committerarnova <arnova@void.org>
Wed, 12 Dec 2012 17:38:18 +0000 (18:38 +0100)
xbmc/guilib/Texture.cpp

index 65c736f..0331263 100644 (file)
@@ -296,7 +296,9 @@ bool CBaseTexture::LoadFromFileInternal(const CStdString& texturePath, unsigned
   }
 
   //ImageLib is sooo sloow for jpegs. Try our own decoder first. If it fails, fall back to ImageLib.
-  if (URIUtils::GetExtension(texturePath).Equals(".jpg") || URIUtils::GetExtension(texturePath).Equals(".tbn"))
+  CStdString Ext = URIUtils::GetExtension(texturePath);
+  Ext.ToLower(); // Ignore case of the extension
+  if (Ext.Equals(".jpg") || Ext.Equals(".jpeg") || Ext.Equals(".tbn"))
   {
     CJpegIO jpegfile;
     if (jpegfile.Open(texturePath, maxWidth, maxHeight))