|
@@ -20,6 +20,8 @@
|
|
|
|
|
|
#include "ddsHandler.h"
|
|
#include "ddsHandler.h"
|
|
|
|
|
|
|
|
+#include <algorithm>
|
|
|
|
+
|
|
namespace love
|
|
namespace love
|
|
{
|
|
{
|
|
namespace image
|
|
namespace image
|
|
@@ -29,7 +31,10 @@ namespace magpie
|
|
|
|
|
|
bool ddsHandler::canParse(const filesystem::FileData *data)
|
|
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 false;
|
|
|
|
|
|
return dds::isCompressedDDS(data->getData(), data->getSize());
|
|
return dds::isCompressedDDS(data->getData(), data->getSize());
|