Created
May 23, 2014 06:43
-
-
Save atiti/62cd1d104a920c63e71b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGDirectDisplayID display[32]; | |
uint32_t displayCount = 0; | |
CGGetActiveDisplayList(32, display, &displayCount); | |
for(int i = 0; i < displayCount; i++) { | |
io_service_t service = CGDisplayIOServicePort(display[i]); | |
CFStringRef nameRef = IORegistryEntryCreateCFProperty(service, CFSTR("CFBundleIdentifier"), kCFAllocatorDefault, 0); | |
if(CFStringCompare(nameRef, CFSTR("info.ennowelbers.framebuffer"), 0)==0) { | |
// success! - display[i] is the display using the proxy framebuffer | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment