diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-22 23:06:51 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-22 23:06:51 +0400 |
commit | 8733150ac18f68da8a45f733554fa74272fcbeea (patch) | |
tree | 9267e489013ba8c7bc5484d799cb3c3c5d1e2c26 /intern/ghost | |
parent | 13f890a26c59e2ce35cd5048e4d235c22fff8fa2 (diff) |
OSX 10.6 error - hiding code behind a respondsToSelector.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 43d3dcb76e7..0ce04c50e81 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -921,12 +921,15 @@ NSScreen* GHOST_WindowCocoa::getScreen() /* called for event, when window leaves monitor to another */ void GHOST_WindowCocoa::setNativePixelSize(void) { - NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]]; - - GHOST_Rect rect; - getClientBounds(rect); + /* make sure 10.6 keeps running */ + if ([m_openGLView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) { + NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]]; + + GHOST_Rect rect; + getClientBounds(rect); - m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth(); + m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth(); + } } /** |