mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Unify pixel format enums for ImageData, CompressedImageData, and Canvas into a single PixelFormat enum.
Replace love.graphics.getRawImageFormats and love.graphics.getCompressedImageFormats with love.graphics.getImageFormats. --HG-- branch : minor
This commit is contained in:
@@ -83,10 +83,10 @@ int w_CompressedImageData_getFormat(lua_State *L)
|
||||
{
|
||||
CompressedImageData *t = luax_checkcompressedimagedata(L, 1);
|
||||
|
||||
image::CompressedImageData::Format format = t->getFormat();
|
||||
PixelFormat format = t->getFormat();
|
||||
const char *str;
|
||||
|
||||
if (image::CompressedImageData::getConstant(format, str))
|
||||
if (getConstant(format, str))
|
||||
lua_pushstring(L, str);
|
||||
else
|
||||
lua_pushstring(L, "unknown");
|
||||
|
||||
Reference in New Issue
Block a user