OSX 10.6 error - hiding code behind a respondsToSelector.

This commit is contained in:
Ton Roosendaal 2013-01-22 19:06:51 +00:00
parent 13f890a26c
commit 8733150ac1

@ -921,12 +921,15 @@ NSScreen* GHOST_WindowCocoa::getScreen()
/* called for event, when window leaves monitor to another */
void GHOST_WindowCocoa::setNativePixelSize(void)
{
/* 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();
}
}
/**