function love.load()
love.filesystem.setIdentity('screenshot_example');
end
function love.keypressed()
local screenshot = love.graphics.newScreenshot();
screenshot:encode('png', os.time() .. '.png');
end
Btw.
This is me following the example in the love2d wiki
Did you read the glaring red box at the top of the wiki article?
> Removed in LÖVE 11.0
> It has been replaced by love.graphics.captureScreenshot.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.