You can use CGDisplayIsBuiltin()
to find out if the display is built-in.
Code example:
int i = 0; for(NSScreen* screen in [NSScreen screens]) { NSDictionary* screenDictionary = [screen deviceDescription]; NSNumber* screenID = [screenDictionary objectForKey:@"NSScreenNumber"]; CGDirectDisplayID aID = [screenID unsignedIntValue]; NSLog(@"Screen number %i is%@ builtin", i, CGDisplayIsBuiltin(aID)? @"": @" not"); i++; }
Tyilo source share