Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-01-22 23:06:51 +0400
committerTon Roosendaal <ton@blender.org>2013-01-22 23:06:51 +0400
commit8733150ac18f68da8a45f733554fa74272fcbeea (patch)
tree9267e489013ba8c7bc5484d799cb3c3c5d1e2c26 /intern/ghost
parent13f890a26c59e2ce35cd5048e4d235c22fff8fa2 (diff)
OSX 10.6 error - hiding code behind a respondsToSelector.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm13
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();
+ }
}
/**