Commits

Alex Szpakowski  committed 9616d85

love.image.isCompressed now compares file extensions in a case-insensitive manner

  • Participants
  • Parent commits 94f7bf5

Comments (0)

Files changed (1)

File src/modules/image/magpie/ddsHandler.cpp

 
 #include "ddsHandler.h"
 
+#include <algorithm>
+
 namespace love
 {
 namespace image
 
 bool ddsHandler::canParse(const filesystem::FileData *data)
 {
-	if (data->getExtension().compare("dds") != 0)
+	std::string ext = data->getExtension();
+	std::transform(ext.begin(), ext.end(), ext.begin(), tolower);
+
+	if (ext.compare("dds") != 0)
 		return false;
 
 	return dds::isCompressedDDS(data->getData(), data->getSize());