mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Error if the ImageData given to love.window.setIcon is not a 32 bit RGBA format.
--HG-- branch : minor
This commit is contained in:
@@ -365,7 +365,9 @@ int w_getPosition(lua_State *L)
|
||||
int w_setIcon(lua_State *L)
|
||||
{
|
||||
image::ImageData *i = luax_checktype<image::ImageData>(L, 1);
|
||||
luax_pushboolean(L, instance()->setIcon(i));
|
||||
bool success = false;
|
||||
luax_catchexcept(L, [&]() { success = instance()->setIcon(i); });
|
||||
luax_pushboolean(L, success);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user