DDMS 屏幕截图与垂直同步不同步

发布于 2024-10-01 21:02:22 字数 378 浏览 0 评论 0原文

我目前正在开发一款 Android 游戏,我想截取它的屏幕截图。 我使用 Eclipse 中的 DDMS 工具来完成此操作。然而,大多数屏幕截图都是两帧的混合:

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

分隔线位于不同的位置。

这让我得出这样的结论:屏幕截图是在当前帧仍在绘制时进行的。

有没有办法让屏幕截图与硬件同步?

是否有其他方法可以制作屏幕截图而不会发生这种情况?

预先感谢您的任何提示!

更新:请参阅我对解决方案已接受答案的最后评论。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月朦胧 2024-10-08 21:02:22

我知道这可能是一个蹩脚的解决方案,但它会是一个快速的解决方案。您能否(暂时、仅调试等)暂停游戏以便截取屏幕截图?又名“冻结”一帧时间?

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?

掐死时间 2024-10-08 21:02:22

复杂的方式:
看看 vnc-server 应用程序。如果您的设备已获得 root 权限,则它可以显示摄像头视频流,而不会出现您所解释的问题。但它使用了大量的 jni 文件,并且仅仅为了截取一些屏幕截图而集成起来可能会很复杂。或者,您可以root您的设备,安装应用程序并在计算机上的vnc-client应用程序上拍摄快照。

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

市场上的应用程序:“org.onaips.vnc”

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"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文