Skip to content

Commit 47c9fb9

Browse files
Refactore some macros
1 parent 5e5c144 commit 47c9fb9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/modules/opengl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ static const char* glHandlePrint(FFinstance* instance, const GLData* data)
5555
return NULL;
5656
}
5757

58+
#endif // FF_HAVE_GL
59+
5860
#ifdef FF_HAVE_EGL
5961
#include <EGL/egl.h>
6062

@@ -340,7 +342,6 @@ static const char* osMesaPrint(FFinstance* instance)
340342
#endif //FF_HAVE_OSMESA
341343

342344
#ifdef __APPLE__
343-
344345
#include <OpenGL/OpenGL.h> // This brings in CGL, not GL
345346

346347
typedef struct CGLData
@@ -389,7 +390,7 @@ static const char* cglPrint(FFinstance* instance)
389390
return error;
390391
}
391392

392-
#else // __APPLE__
393+
#elif FF_HAVE_GL
393394

394395
static const char* glPrint(FFinstance* instance)
395396
{
@@ -437,9 +438,7 @@ static const char* glPrint(FFinstance* instance)
437438
return error;
438439
}
439440

440-
#endif // !__APPLE__
441-
442-
#endif // FF_HAVE_GL
441+
#endif // !__APPLE__ && FF_HAVE_GL
443442

444443
void ffPrintOpenGL(FFinstance* instance)
445444
{

0 commit comments

Comments
 (0)