mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Improved the error message when love.graphics.newImage fails due to CompressedImageData not having all required mipmap levels (thanks Shell32!)
This commit is contained in:
@@ -133,7 +133,11 @@ Image::Image(const std::vector<love::image::CompressedImageData *> &compressedda
|
||||
if (compresseddata[0]->getMipmapCount() == 1)
|
||||
this->flags.mipmaps = false;
|
||||
else
|
||||
throw love::Exception("Image cannot have mipmaps: compressed image data does not have all required mipmap levels.");
|
||||
{
|
||||
throw love::Exception("Image cannot have mipmaps: compressed image data does not have all required mipmap levels (expected %d, got %d)",
|
||||
getMipmapCount(width, height),
|
||||
compresseddata[0]->getMipmapCount());
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &cd : compresseddata)
|
||||
|
||||
Reference in New Issue
Block a user