mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
love.image.isCompressed now compares file extensions in a case-insensitive manner
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "ddsHandler.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace love
|
||||
{
|
||||
namespace image
|
||||
@@ -29,7 +31,10 @@ namespace magpie
|
||||
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user