mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Simplified the error message on image creation failure
This commit is contained in:
@@ -309,12 +309,7 @@ bool Image::loadVolatilePOT()
|
|||||||
data->getData());
|
data->getData());
|
||||||
|
|
||||||
if (glGetError() != GL_NO_ERROR)
|
if (glGetError() != GL_NO_ERROR)
|
||||||
{
|
throw love::Exception("Cannot create image: size may be too large for this system.");
|
||||||
if (p2width > width || p2height > height)
|
|
||||||
throw love::Exception("Cannot create image: padded size may be larger than the maximum supported on this system.");
|
|
||||||
else
|
|
||||||
throw love::Exception("Cannot create image: size may be larger than the maximum supported on this system.");
|
|
||||||
}
|
|
||||||
|
|
||||||
mipmapsCreated = false;
|
mipmapsCreated = false;
|
||||||
checkMipmapsCreated();
|
checkMipmapsCreated();
|
||||||
@@ -344,7 +339,7 @@ bool Image::loadVolatileNPOT()
|
|||||||
data->getData());
|
data->getData());
|
||||||
|
|
||||||
if (glGetError() != GL_NO_ERROR)
|
if (glGetError() != GL_NO_ERROR)
|
||||||
throw love::Exception("Cannot create image: size may be larger than the maximum supported on this system.");
|
throw love::Exception("Cannot create image: size may be too large for this system.");
|
||||||
|
|
||||||
mipmapsCreated = false;
|
mipmapsCreated = false;
|
||||||
checkMipmapsCreated();
|
checkMipmapsCreated();
|
||||||
|
|||||||
Reference in New Issue
Block a user