diff --git a/src/base/log.cpp b/src/base/log.cpp index 0816cdff..a5b9e8ad 100644 --- a/src/base/log.cpp +++ b/src/base/log.cpp @@ -17,6 +17,7 @@ #if defined(_WIN32) # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN #endif #if defined(__ANDROID__) diff --git a/src/base/string.cpp b/src/base/string.cpp index 1ff24664..3a7e1fca 100644 --- a/src/base/string.cpp +++ b/src/base/string.cpp @@ -17,6 +17,7 @@ #if defined(_WIN32) # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN #endif #include diff --git a/src/gpu/renderer.cpp b/src/gpu/renderer.cpp index d252d4bd..224fee30 100644 --- a/src/gpu/renderer.cpp +++ b/src/gpu/renderer.cpp @@ -18,8 +18,9 @@ # if defined USE_D3D9 # include # endif -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # include +# undef WIN32_LEAN_AND_MEAN # undef near /* Fuck Microsoft */ # undef far /* Fuck Microsoft again */ #endif diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 78cf137d..8b01d330 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -16,8 +16,9 @@ #include #if defined _WIN32 -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 # include +# undef WIN32_LEAN_AND_MEAN # if defined USE_D3D9 # include using std::min; diff --git a/src/lol/base/assert.h b/src/lol/base/assert.h index 330923f3..400915d3 100644 --- a/src/lol/base/assert.h +++ b/src/lol/base/assert.h @@ -16,6 +16,14 @@ #include +#if defined _WIN32 +# define WIN32_LEAN_AND_MEAN 1 +# include +# undef WIN32_LEAN_AND_MEAN +# undef near /* Fuck Microsoft */ +# undef far /* Fuck Microsoft again */ +#endif + namespace lol { diff --git a/src/scene.cpp b/src/scene.cpp index 6a58ec8b..c9d5618a 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -18,6 +18,7 @@ #if defined(_WIN32) # define WIN32_LEAN_AND_MEAN 1 # include +# undef WIN32_LEAN_AND_MEAN #endif #include "lolgl.h" diff --git a/src/sys/file.cpp b/src/sys/file.cpp index 80f01860..1c97425f 100644 --- a/src/sys/file.cpp +++ b/src/sys/file.cpp @@ -18,6 +18,7 @@ #if defined(_WIN32) # define WIN32_LEAN_AND_MEAN 1 # include +# undef WIN32_LEAN_AND_MEAN #else # include #endif diff --git a/src/sys/init.cpp b/src/sys/init.cpp index 90c2d299..8cb0d8c3 100644 --- a/src/sys/init.cpp +++ b/src/sys/init.cpp @@ -21,6 +21,7 @@ #if _WIN32 # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN #endif namespace lol diff --git a/src/sys/timer.cpp b/src/sys/timer.cpp index 7ed0a902..e9a01ed0 100644 --- a/src/sys/timer.cpp +++ b/src/sys/timer.cpp @@ -20,6 +20,7 @@ #elif _WIN32 # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN #elif HAVE_SDL_SDL_H # include #else diff --git a/src/textureimage.cpp b/src/textureimage.cpp index 045543c9..19a5f627 100644 --- a/src/textureimage.cpp +++ b/src/textureimage.cpp @@ -17,6 +17,7 @@ #if defined _WIN32 # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN # if defined USE_D3D9 # define FAR # define NEAR diff --git a/src/tileset.cpp b/src/tileset.cpp index 4735651e..86df6668 100644 --- a/src/tileset.cpp +++ b/src/tileset.cpp @@ -19,6 +19,7 @@ #if defined _WIN32 # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN # if defined USE_D3D9 # define FAR # define NEAR diff --git a/src/video.cpp b/src/video.cpp index 8d6fc34b..e9a30579 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -16,6 +16,7 @@ # endif # define WIN32_LEAN_AND_MEAN # include +# undef WIN32_LEAN_AND_MEAN # undef near /* Fuck Microsoft */ # undef far /* Fuck Microsoft again */ #endif