mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
readded support for screenshots - love.graphics.newScreenshot() returns ImageData that can be manipulated as one pleases
This commit is contained in:
@@ -45,7 +45,12 @@ namespace image
|
||||
if(luax_istype(L, 1, DATA_T))
|
||||
{
|
||||
Data * d = luax_checktype<Data>(L, 1, "Data", DATA_T);
|
||||
ImageData * t = instance->newImageData(d);
|
||||
ImageData * t;
|
||||
try {
|
||||
t = instance->newImageData(d);
|
||||
} catch (love::Exception & e) {
|
||||
return luaL_error(L, e.what());
|
||||
}
|
||||
luax_newtype(L, "ImageData", IMAGE_IMAGE_DATA_T, (void*)t);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user