Pārlūkot izejas kodu

Fix mac compilation

TothBenoit 1 gadu atpakaļ
vecāks
revīzija
31cee2a1eb
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      libs/sdl/gl.c

+ 5 - 1
libs/sdl/gl.c

@@ -52,8 +52,12 @@
 #include "GLImports.h"
 #undef GL_IMPORT
 #define GL_IMPORT(fun,t)	fun = (PFNGL##t##PROC)SDL_GL_GetProcAddress(#fun); if( fun == NULL ) return 1
+#ifndef __APPLE__
 #define GL_IMPORT_OPT(fun, t) PFNGL##t##PROC fun = NULL; if ( !fun ) { fun = (PFNGL##t##PROC)SDL_GL_GetProcAddress(#fun); if( fun == NULL ) hl_error("function not resolved"); }
-#else
+#endif
+#endif
+
+#if !defined GL_IMPORT_OPT
 #define GL_IMPORT_OPT(fun, t)
 #define glMultiDrawElementsIndirectCountARB(...) hl_error("function not resolved");
 #endif