Advertisement
Combreal

screenResOsx01.cpp

Sep 28th, 2018
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <CoreGraphics/CGContext.h>
  3. #include <CoreGraphics/CGError.h>
  4. #include <CoreGraphics/CGGeometry.h>
  5.  
  6. int main(void)
  7. {
  8.   int x=0, y=0;
  9.  
  10.   x = CGDisplayPixelsWide(CGDirectDisplayID());
  11.   y = CGDisplayPixelsHigh(CGDirectDisplayID());
  12.   std::cout<<"x : "<<x<<std::endl;
  13.   std::cout<<"y : "<<y<<std::endl;
  14.  
  15.   return 0;
  16. }
  17.  
  18. //g++ -isysroot /Developer/SDKs/MacOSX10.6.sdk -o testScreenres main.cpp && ./testScreenres
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement