X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f082dcd598c2489b67a32528cdf263918d92b449..1829d71c4063cf7549292bf56038a3c6a9d9f777:/src/osx/cocoa/window.mm?ds=sidebyside diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index c76c1a8580..3465cdbc40 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1703,6 +1703,17 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible ) [m_osxView setHidden:(visible ? NO:YES)]; } +double wxWidgetCocoaImpl::GetContentScaleFactor() const +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + NSWindow* tlw = [m_osxView window]; + if ( [ tlw respondsToSelector:@selector(backingScaleFactor) ] ) + return [tlw backingScaleFactor]; + else +#endif + return 1.0; +} + // ---------------------------------------------------------------------------- // window animation stuff // ----------------------------------------------------------------------------