Anselm Eickhoff
Anselm Eickhoff

Reputation: 589

DDMS screenshot not in sync with vsync

I'm currently developing a game for Android and I want to take screenshots of it. I did so using the DDMS tool in eclipse. However, most of the screenshots are a mix of two frames:

___________
|new frame|
|         |
|         |
|_________|
|old frame|
|         |
|_________|

The separating line is in different positions.

This leads me to the conclusion that the screenshot is being made while the current frame is still being drawn.

Is there a way to get the screencap in sync with the hardware?

Are there other methods of making screenshots where this doesn't happen?

Thanks in advance for any hints!

Update: See my last comment on accepted answer for my solution.

Upvotes: 1

Views: 805

Answers (2)

Hrk
Hrk

Reputation: 2764

Complicate way: Have a look at vnc-server app. If your device is rooted, it can display camera video flow without the problem you explain. But it uses a lot of jni file and could be complicated to integrate only to take some screenshot. Or you can root your device, install the application and take snapshot on your computer vnc-client application.

https://github.com/oNaiPs/droid-VNC-server/tree/

Application on market : "org.onaips.vnc"

Upvotes: 0

Bryan Denny
Bryan Denny

Reputation: 27596

I know this might be a crappy solution, but it would be a quick one. Can you (temporarily, debug only, etc.) have the game paused such that you can take the screenshots? Aka, "freeze" a single frame of time?

Upvotes: 4

Related Questions