Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <CoreGraphics/CGContext.h>
- #include <CoreGraphics/CGError.h>
- #include <CoreGraphics/CGGeometry.h>
- int main(void)
- {
- int x=0, y=0;
- x = CGDisplayPixelsWide(CGDirectDisplayID());
- y = CGDisplayPixelsHigh(CGDirectDisplayID());
- std::cout<<"x : "<<x<<std::endl;
- std::cout<<"y : "<<y<<std::endl;
- return 0;
- }
- //g++ -isysroot /Developer/SDKs/MacOSX10.6.sdk -o testScreenres main.cpp && ./testScreenres
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement