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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/gfx/nvapi/nvapi-include.h b/tools/gfx/nvapi/nvapi-include.h
new file mode 100644
index 000000000..e3674af95
--- /dev/null
+++ b/tools/gfx/nvapi/nvapi-include.h
@@ -0,0 +1,19 @@
+// nvapi-include.h
+#pragma once
+
+// A helper that makes the NVAPI available across targets
+
+#ifdef GFX_NVAPI
+// On windows if we include NVAPI, we must include windows.h first
+
+# ifdef _WIN32
+# define WIN32_LEAN_AND_MEAN
+# define NOMINMAX
+# include <Windows.h>
+# undef WIN32_LEAN_AND_MEAN
+# undef NOMINMAX
+# endif
+
+# include <nvapi.h>
+#endif
+