I can't take a screenshot
Posted: Sun Oct 08, 2017 8:46 am
Hi, guys
I've been trying to search an answer in the forum for myyy problem, but doesn't matter how I do this, it just doesn't work for me.
in the code, i'm doing this:
i'm just following the example shown in the wiki, as you can see, but it doesn''t work anyway.
'HardData' is a directory which I created manually, and it's in the same directory than the main.lua.
Do I need to create a canvas or something like that? I'm just drawing an image and then drawing some circles in it.
hope you guys can guess my problem. thx in advance.
I've been trying to search an answer in the forum for myyy problem, but doesn't matter how I do this, it just doesn't work for me.
in the code, i'm doing this:
Code: Select all
function love.load()
love.filesystem.setIdentity('HardData');
-- (...)
end
-- (...)
function love.keypressed(enter)
local screenshot = love.graphics.newScreenshot();
screenshot:encode('png', os.time() .. '.png');
love.event.quit()
end
--(...)
'HardData' is a directory which I created manually, and it's in the same directory than the main.lua.
Do I need to create a canvas or something like that? I'm just drawing an image and then drawing some circles in it.
hope you guys can guess my problem. thx in advance.