summaryrefslogtreecommitdiffstats
path: root/tools/gfx/nvapi/nvapi-include.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/nvapi/nvapi-include.h')
-rw-r--r--tools/gfx/nvapi/nvapi-include.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gfx/nvapi/nvapi-include.h b/tools/gfx/nvapi/nvapi-include.h
index c213e0bfb..513977048 100644
--- a/tools/gfx/nvapi/nvapi-include.h
+++ b/tools/gfx/nvapi/nvapi-include.h
@@ -7,11 +7,15 @@
// On windows if we include NVAPI, we must include windows.h first
# ifdef _WIN32
+# pragma push_macro("WIN32_LEAN_AND_MEAN")
+# pragma push_macro("NOMINMAX")
+# undef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
+# undef NOMINMAX
# define NOMINMAX
-# include <Windows.h>
-# undef WIN32_LEAN_AND_MEAN
-# undef NOMINMAX
+# include <windows.h>
+# pragma pop_macro("NOMINMAX")
+# pragma pop_macro("WIN32_LEAN_AND_MEAN")
# endif
# include <nvapi.h>