From ac0b9c86c21ded649b44a4254b1d85e6ad0cad46 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Jul 2020 19:12:08 +0100 Subject: [PATCH] Proper way to (un)define the value --- source/modules/dgl/Base.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/modules/dgl/Base.hpp b/source/modules/dgl/Base.hpp index 7c057d8ca..f100c2be6 100644 --- a/source/modules/dgl/Base.hpp +++ b/source/modules/dgl/Base.hpp @@ -36,7 +36,8 @@ // Fix OpenGL includes for Windows, based on glfw code #ifndef APIENTRY -# define APIENTRY WINAPI +# define APIENTRY __stdcall +# define DGL_APIENTRY_DEFINED #endif // APIENTRY /* We need WINGDIAPI defined */ @@ -102,6 +103,11 @@ // ----------------------------------------------------------------------- // Fix OpenGL includes for Windows, based on glfw code +#ifdef DGL_APIENTRY_DEFINED +# undef APIENTRY +# undef DGL_APIENTRY_DEFINED +#endif + #ifdef DGL_WINGDIAPI_DEFINED # undef WINGDIAPI # undef DGL_WINGDIAPI_DEFINED