summaryrefslogtreecommitdiff
path: root/graphics/clutter08/patches/patch-ab
blob: 2c90380b8e3332d8e1a359391c6358658d96d42e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ab,v 1.1 2010/05/25 07:25:44 obache Exp $

falls back to gmodule, same as clutter-1.x.

--- clutter/cogl/gl/cogl.c.orig	2009-02-20 15:41:39.000000000 +0000
+++ clutter/cogl/gl/cogl.c
@@ -82,6 +82,7 @@ _cogl_error_string(GLenum errorCode)
 CoglFuncPtr
 cogl_get_proc_address (const gchar* name)
 {
+  static GModule *module = NULL;
   /* Sucks to ifdef here but not other option..? would be nice to
    * split the code up for more reuse (once more backends use this
    */
@@ -122,11 +123,10 @@ cogl_get_proc_address (const gchar* name
 
   return (CoglFuncPtr) wglGetProcAddress ((LPCSTR) name);
 
-#else /* HAVE_CLUTTER_WIN32 */
+#endif /* HAVE_CLUTTER_WIN32 */
 
   /* this should find the right function if the program is linked against a
    * library providing it */
-  static GModule *module = NULL;
   if (module == NULL)
     module = g_module_open (NULL, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
 
@@ -138,8 +138,6 @@ cogl_get_proc_address (const gchar* name
         return symbol;
     }
 
-#endif /* HAVE_CLUTTER_WIN32 */
-
   return NULL;
 }