Issues with screen capture on OS X - CGDisplayCreateImage

末鹿安然 提交于 2020-01-04 21:29:20

问题


I am using CGDisplayCreateImage(CGMainDisplayID()) to capture screen. When we do a fast user switch to another user, it still captures screen from first user. CGMainDisplayID() on second user returns 1104977152. Any idea why this is happening?

My intention is to capture active screen. In case of mirroring, I don't mind capturing the active display.

Other than Quartz APIs, any other suggestions?

来源:https://stackoverflow.com/questions/31475656/issues-with-screen-capture-on-os-x-cgdisplaycreateimage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!