]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/window.mm
Add wxTimer::StartOnce().
[wxWidgets.git] / src / osx / cocoa / window.mm
index c76c1a858073cac78be240f43c1adb49bcfbe96a..3465cdbc408936b3962eb40019b03f132bda4555 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------