keep older version for iOS, CGDisplay doesn't exist there

This commit is contained in:
Stefan Csomor 2017-06-20 19:55:29 +02:00
parent e2e99f5c91
commit 5276800576

View File

@ -150,11 +150,23 @@ bool wxDoLaunchDefaultBrowser(const wxLaunchBrowserParams& params)
void wxDisplaySizeMM(int *width, int *height)
{
#if wxOSX_USE_IPHONE
wxDisplaySize(width, height);
// on mac 72 is fixed (at least now;-)
double cvPt2Mm = 25.4 / 72;
if (width != NULL)
*width = int( *width * cvPt2Mm );
if (height != NULL)
*height = int( *height * cvPt2Mm );
#else
CGSize size = CGDisplayScreenSize(CGMainDisplayID());
if ( width )
*width = (int)size.width ;
if ( height )
*height = (int)size.height;
#endif
}