summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dispatch/compat.h2
-rw-r--r--dispatch/d3d10imports.hpp9
-rw-r--r--dispatch/d3d11imports.hpp17
-rw-r--r--dispatch/d3derr.hpp30
-rw-r--r--retrace/CMakeLists.txt2
5 files changed, 31 insertions, 29 deletions
diff --git a/dispatch/compat.h b/dispatch/compat.h
index 33819896..be7ab787 100644
--- a/dispatch/compat.h
+++ b/dispatch/compat.h
@@ -37,10 +37,12 @@
* Several of the defines below clash with libstdc++ internal variables,
* so include the headers now, before they are re-defined.
*/
+#ifdef __cplusplus
#include <algorithm>
#include <iostream>
#include <memory>
#include <vector>
+#endif
/*
diff --git a/dispatch/d3d10imports.hpp b/dispatch/d3d10imports.hpp
index 72118434..8af79811 100644
--- a/dispatch/d3d10imports.hpp
+++ b/dispatch/d3d10imports.hpp
@@ -42,13 +42,4 @@
#include "dxgiint.h"
-#ifndef D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
-#define D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D10_HRESULT(1)
-#endif
-
-#ifndef D3D10_ERROR_FILE_NOT_FOUND
-#define D3D10_ERROR_FILE_NOT_FOUND MAKE_D3D10_HRESULT(2)
-#endif
-
-
#endif /* _D3D10IMPORTS_HPP_ */
diff --git a/dispatch/d3d11imports.hpp b/dispatch/d3d11imports.hpp
index 05ddef9c..6cc18fcd 100644
--- a/dispatch/d3d11imports.hpp
+++ b/dispatch/d3d11imports.hpp
@@ -42,21 +42,4 @@
#include "dxgiint.h"
-#ifndef D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
-#define D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D11_HRESULT(1)
-#endif
-
-#ifndef D3D11_ERROR_FILE_NOT_FOUND
-#define D3D11_ERROR_FILE_NOT_FOUND MAKE_D3D11_HRESULT(2)
-#endif
-
-#ifndef D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS
-#define D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS MAKE_D3D11_HRESULT(3)
-#endif
-
-#ifndef D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD
-#define D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD MAKE_D3D11_HRESULT(4)
-#endif
-
-
#endif /* _D3D11IMPORTS_HPP_ */
diff --git a/dispatch/d3derr.hpp b/dispatch/d3derr.hpp
index 39a3e9c4..67255215 100644
--- a/dispatch/d3derr.hpp
+++ b/dispatch/d3derr.hpp
@@ -24,7 +24,7 @@
**************************************************************************/
/*
- * D3DERR return codes.
+ * Direct3D error codes.
*
* These were defined in d3dx10.h/d3dx11.h on DirectX SDK, and moved to
* winerror.h on Windows 8 SDK.
@@ -40,7 +40,7 @@
#ifndef _FACD3D
-#define _FACD3D 0x876
+#define _FACD3D 0x876
#endif
#ifndef MAKE_D3DHRESULT
@@ -60,4 +60,30 @@
#endif
+#ifndef D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
+#define D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D10_HRESULT(1)
+#endif
+
+#ifndef D3D10_ERROR_FILE_NOT_FOUND
+#define D3D10_ERROR_FILE_NOT_FOUND MAKE_D3D10_HRESULT(2)
+#endif
+
+
+#ifndef D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS
+#define D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D11_HRESULT(1)
+#endif
+
+#ifndef D3D11_ERROR_FILE_NOT_FOUND
+#define D3D11_ERROR_FILE_NOT_FOUND MAKE_D3D11_HRESULT(2)
+#endif
+
+#ifndef D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS
+#define D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS MAKE_D3D11_HRESULT(3)
+#endif
+
+#ifndef D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD
+#define D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD MAKE_D3D11_HRESULT(4)
+#endif
+
+
#endif /* _D3DERR_HPP_ */
diff --git a/retrace/CMakeLists.txt b/retrace/CMakeLists.txt
index 0fd15357..c4ad533a 100644
--- a/retrace/CMakeLists.txt
+++ b/retrace/CMakeLists.txt
@@ -221,7 +221,7 @@ if (WIN32)
)
if (DirectX_D3D11_1_INCLUDE_DIR)
- include_directories (BEFORE
+ include_directories (BEFORE SYSTEM
${DirectX_D3D11_1_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/thirdparty/directxtex/DirectXTex
)