From 31cee2a1ebfb11a1bc27a28ffa6b655dae88d138 Mon Sep 17 00:00:00 2001 From: TothBenoit Date: Fri, 26 Jul 2024 16:10:59 +0200 Subject: [PATCH] Fix mac compilation --- libs/sdl/gl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/sdl/gl.c b/libs/sdl/gl.c index 4888c12bb..860928078 100644 --- a/libs/sdl/gl.c +++ b/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