corona
corona copied to clipboard
[All platforms]: Using capture functions removes any objects created on that same frame
Describe the bug Since Solar2D 3691, using any display capture functionality removes display objects created on the same frame. Running the code below results in 2 rectangles on Solar2D 3690, and just the white rectangle on 3691.
Probably related to: https://github.com/coronalabs/corona/pull/566
To Reproduce
local whiteRect = display.newRect(display.contentCenterX, display.contentCenterY, 20, 20)
whiteRect:setFillColor(1, 1, 1)
timer.performWithDelay(1, function()
local redRect = display.newRect(display.contentCenterX, display.contentCenterY + 20, 20, 20)
redRect:setFillColor(1, 0, 0)
display.colorSample(14, 14, function() end)
end)
@pouwelsjochem I have tested your code on Solar2D 3691 and I am getting both white and red rectangles.
Interesting, what device did you test on? I'm on a M1 Mac
I am on M1 Mac Mini with Ventura 13.4.1.