if Input.is_key_pressed(KEY_PRINT):
# start screen capture
var image = get_viewport().get_texture().get_data()
image.flip_y()
image.save_png("c:/lixo/screenshot.png")
Believe it or not, now it stopped saving screenshots. When I press PrintScreen, the program stutters a little like before, which seems it's saving the screenshot, but when I look inside it, there's no screenshot. :(
And before someone asks, yes, I have the permission for the folder and there's no file in there that cannot be overwritten.