X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ec5dba3944805b06621cf11eb1f54948f85cdaa..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/cocoa/window.mm diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 8580b52b5b..3465cdbc40 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -17,6 +17,7 @@ #include "wx/log.h" #include "wx/textctrl.h" #include "wx/combobox.h" + #include "wx/radiobut.h" #endif #ifdef __WXMAC__ @@ -1702,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 // ----------------------------------------------------------------------------