Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix screenshots and replace CGDisplayBaseAddress #3

Open
alexchandel opened this issue Apr 22, 2016 · 0 comments
Open

Fix screenshots and replace CGDisplayBaseAddress #3

alexchandel opened this issue Apr 22, 2016 · 0 comments

Comments

@alexchandel
Copy link
Owner

Apple deprecated some useful CG display functions in the 64-bit transition, including CGDisplayBaseAddress() which we use to get a pointer to the display. The horrible hack to fix the build is just to redeclare the deprecated symbols in our header. This works (for now) for the size_t functions, but calling CGDisplayBaseAddress() results in this warning getting printed:

Apr 22 14:23:18  procfs[10539] <Warning>: CGDisplayBaseAddress is obsolete and returning an empty buffer for display 0x4280500

So screenshots (i.e. cat /proc/system/hardware/displays/0/screenshot.png > ~/Desktop/scn.png) don't work, and result in some variant of Resource busy for the client.

We need to find a new way to get the display buffer. For screenshot purposes, using CGDisplayCreateImage to copy the framebuffer should suffice. (However, for users wanting to do this, we should also find a new way to stomp on the framebuffer directly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant