Quote:
Originally Posted by olilarkin
bool isRetina = CGContextConvertSizeToDeviceSpace(pCGC, CGSizeMake(1,1)).width > 1.9;
|
Thanks Oli. This is first thing I tried out it this doesn't give us right GUI scaling. For example if I set lower resolution on my 1080p monitor connected to my non retina macbook function returns 300. Also this function requires mGraphicsCocoa which is not available until we open the window which is not a deal breaker but it would be nice to have option to get correct scaling even before you open the window. On windows this is handled by getting main window and returning it's DPI. I have already implement this on windows side (though I still have to test this more), now only to figure this on mac side. Did I mention that I hate doing objective c btw..