Skip to content

Commit

Permalink
Mac GetMonitors Perf Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smasherprog committed Apr 10, 2017
1 parent 76b62bd commit 47baf19
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/ios/GetMonitors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 47baf19

Please sign in to comment.