From 5276800576296e694390fdbd13bacb6c7f7bf85c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 20 Jun 2017 19:55:29 +0200 Subject: [PATCH] keep older version for iOS, CGDisplay doesn't exist there --- src/osx/utils_osx.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/osx/utils_osx.cpp b/src/osx/utils_osx.cpp index b51184f701..47e07ba683 100644 --- a/src/osx/utils_osx.cpp +++ b/src/osx/utils_osx.cpp @@ -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 }