diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-04-14 17:08:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-14 17:08:18 +0800 |
| commit | 4c9c8a7a4d9b97fec6041a562638fbea521533ed (patch) | |
| tree | bcbe353f9c3a64ce7e7e5419c4172a5fadac297b /tools/platform | |
| parent | 5a629b3ccd801a1f0647e971d01481c55d3381c2 (diff) | |
Some small fixes with Windows/DX usage (#2797)
* Correct case of windows.h includes
* Use Slang::SharedLibrary to load directx dlls
* s/max/std::max/
* Factor common OS code in calcHasApi
* Add DXIL test for compute/simple
* s/false/FALSE for calls to WinAPI functions
* Factor common OS code in gfxGetAdapters
* 2 missing headers
d3d12sdklayers for ID3DDebug
climits for UINT_MAX
* Define out unused function on Linux
* Only try to load Vulkan and CUDA on Windows or Linux
* simplify D3DUtil::getDxgiModule
* Remove WIN32_LEAN_AND_MEAN &co from source files
Add a global define
* Set WIN32_LEAN_AND_MEAN &friends in headers
Restore previous state also
* regenerate vs projects
Diffstat (limited to 'tools/platform')
| -rw-r--r-- | tools/platform/gui.cpp | 4 | ||||
| -rw-r--r-- | tools/platform/windows/win-window.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/platform/gui.cpp b/tools/platform/gui.cpp index 8bfff2d11..a4602e4f2 100644 --- a/tools/platform/gui.cpp +++ b/tools/platform/gui.cpp @@ -353,5 +353,9 @@ GUI::~GUI() #include "external/imgui/imgui.cpp" #include "external/imgui/imgui_draw.cpp" #ifdef _WIN32 +// imgui_impl_win32 defines these, so make sure it doesn't error because +// they're already there +#undef WIN32_LEAN_AND_MEAN +#undef NOMINMAX #include "external/imgui/examples/imgui_impl_win32.cpp" #endif diff --git a/tools/platform/windows/win-window.cpp b/tools/platform/windows/win-window.cpp index f0217e04c..d785b0fb7 100644 --- a/tools/platform/windows/win-window.cpp +++ b/tools/platform/windows/win-window.cpp @@ -2,8 +2,7 @@ #include "../window.h" -#define WIN32_LEAN_AND_MEAN -#include <Windows.h> +#include <windows.h> #include <windowsx.h> using namespace Slang; |
