Closed jasonexe2000 closed 1 year ago
That's an interesting issue. I've no idea why it behaves like this (and couldn't find anything in the docs about it) but it seems like the LastPresentTime
for the first captured frame is always 0 if the capture was initialized after another call to AcquireNextFrame
(even though they are not targeting the same display - I'd guess it's because they are on the same gpu but can't verify that).
There seem to be two ways to workaround that:
CaptureScreen
twice before saving the image (to have an actual update after first that returns without a frame) (EDIT: or to be more specific call it again until it returns true - which should always be second call in that case)
When I use multiple screens to take screenshots, all of them except the first one show up as black screens.