mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +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 "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());
|
||||||
|
|||||||
Reference in New Issue
Block a user