diff --git a/src/ios/GetMonitors.cpp b/src/ios/GetMonitors.cpp index cec56978..5deeb3be 100644 --- a/src/ios/GetMonitors.cpp +++ b/src/ios/GetMonitors.cpp @@ -19,13 +19,10 @@ namespace SL{ //only include non-mirrored displays if(CGDisplayMirrorsDisplay(displays[i]) == kCGNullDirectDisplay){ - auto imageRef = CGDisplayCreateImage(displays[i]); - if(!imageRef) continue; - - auto width = CGImageGetWidth(imageRef); - auto height = CGImageGetHeight(imageRef); - CGImageRelease(imageRef); - + + auto width = CGDisplayPixelsWide(displays[i]); + auto height = CGDisplayPixelsHigh(displays[i]); + auto r = CGDisplayBounds(displays[i]); auto name = std::string("Monitor ") + std::to_string(displays[i]);