aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-03-25 10:52:07 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-03-25 10:52:07 +0000
commit1b1b6c89e39d620bed28f810bb2a8d8d51f1b306 (patch)
tree616d21a34cff7e414c9929404665f9d5dd95997f
parentcab2ad6b4394b8577965d60d48e07f17ee5af2c0 (diff)
downloadjitsi-1b1b6c89e39d620bed28f810bb2a8d8d51f1b306.zip
jitsi-1b1b6c89e39d620bed28f810bb2a8d8d51f1b306.tar.gz
jitsi-1b1b6c89e39d620bed28f810bb2a8d8d51f1b306.tar.bz2
Fixes a crash in the JAWTRenderer on Mac OS X 10.5 reported by Emil Ivov and caused by use of 10.6+ API.
-rwxr-xr-xlib/native/mac/libjawtrenderer.jnilibbin89800 -> 89832 bytes
-rw-r--r--src/native/jawtrenderer/JAWTRenderer_MacOSX.m21
2 files changed, 18 insertions, 3 deletions
diff --git a/lib/native/mac/libjawtrenderer.jnilib b/lib/native/mac/libjawtrenderer.jnilib
index c069b10..0954b49 100755
--- a/lib/native/mac/libjawtrenderer.jnilib
+++ b/lib/native/mac/libjawtrenderer.jnilib
Binary files differ
diff --git a/src/native/jawtrenderer/JAWTRenderer_MacOSX.m b/src/native/jawtrenderer/JAWTRenderer_MacOSX.m
index 0ae6227..27a2148 100644
--- a/src/native/jawtrenderer/JAWTRenderer_MacOSX.m
+++ b/src/native/jawtrenderer/JAWTRenderer_MacOSX.m
@@ -365,9 +365,24 @@ JAWTRenderer_removeNotifyLightweightComponent(jlong handle, jobject component)
if (glContext)
{
- NSOpenGLPixelFormat *format
- = [[NSOpenGLPixelFormat alloc]
- initWithCGLPixelFormatObj:pixelFormat];
+ NSOpenGLPixelFormat *format = [NSOpenGLPixelFormat alloc];
+
+ /*
+ * Unfortunately, initWithCGLPixelFormatObj: is available starting
+ * with Mac OS X 10.6.
+ */
+ if ([format
+ respondsToSelector:@selector(initWithCGLPixelFormatObj:)])
+ {
+ format = [format initWithCGLPixelFormatObj:pixelFormat];
+ }
+ else
+ {
+ NSOpenGLPixelFormatAttribute pixelFormatAttribs[]
+ = { NSOpenGLPFAWindow, 0 };
+
+ format = [format initWithAttributes:pixelFormatAttribs];
+ }
self->glContext
= [[NSOpenGLContext alloc]