osx: Fix a warning on Snow Leopard
authorJoshua Lock <josh@linux.intel.com>
Thu, 5 Nov 2009 15:48:25 +0000 (15:48 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 6 Nov 2009 11:48:42 +0000 (11:48 +0000)
Apple where nice and changed API between releases. This patch checks the
version of the compilation environment and tries to use the right parameter
type.

http://bugzilla.openedhand.com/show_bug.cgi?id=1866

clutter/osx/clutter-backend-osx.c

index f8d9e31..23267cb 100644 (file)
@@ -68,8 +68,12 @@ clutter_backend_osx_post_parse (ClutterBackend  *backend,
                    initWithFormat: self->pixel_format
                      shareContext: nil];
 
-  /* Enable vblank sync - http://developer.apple.com/qa/qa2007/qa1521.html*/
-  const long sw = 1;
+  /* Enable vblank sync - http://developer.apple.com/qa/qa2007/qa1521.html */
+  #ifdef MAC_OS_X_VERSION_10_5
+       const int sw = 1;
+  #else
+    const long sw = 1;
+  #endif
   [self->context setValues:&sw forParameter: NSOpenGLCPSwapInterval];
 
   /* FIXME: move the debugging bits to cogl */