From 7370bd56cea21ac7bad6da86cd4bda7a89a3e63a Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 3 Mar 2016 20:36:30 -0400 Subject: [PATCH] Improved the error message when love.graphics.newImage fails due to CompressedImageData not having all required mipmap levels (thanks Shell32!) --- src/modules/graphics/opengl/Image.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/Image.cpp b/src/modules/graphics/opengl/Image.cpp index 0d41ccdbb..2fb3497e5 100644 --- a/src/modules/graphics/opengl/Image.cpp +++ b/src/modules/graphics/opengl/Image.cpp @@ -133,7 +133,11 @@ Image::Image(const std::vector &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)