Skip to content

Commit ddf2598

Browse files
committed
xrCore: obtaining CPU information was rewritten to C++ instead of ASM
fixed "Mixed" configuration build default directx sdk dxerr.lib replaced by custom project, compatible with visual c++ 2015
1 parent d57b70e commit ddf2598

38 files changed

+4668
-530
lines changed

code/SDK/include/dxerr/dxerr.h

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//--------------------------------------------------------------------------------------
2+
// File: DXErr.h
3+
//
4+
// DirectX Error Library
5+
//
6+
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
7+
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
8+
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
9+
// PARTICULAR PURPOSE.
10+
//
11+
// Copyright (c) Microsoft Corporation. All rights reserved.
12+
//--------------------------------------------------------------------------------------
13+
14+
// This version only supports UNICODE.
15+
16+
#pragma once
17+
18+
#if !defined(NOMINMAX)
19+
#define NOMINMAX
20+
#endif
21+
22+
#include <windows.h>
23+
#include <sal.h>
24+
25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
29+
//--------------------------------------------------------------------------------------
30+
// DXGetErrorString
31+
//--------------------------------------------------------------------------------------
32+
const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
33+
34+
#define DXGetErrorString DXGetErrorStringW
35+
36+
//--------------------------------------------------------------------------------------
37+
// DXGetErrorDescription has to be modified to return a copy in a buffer rather than
38+
// the original static string.
39+
//--------------------------------------------------------------------------------------
40+
void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
41+
42+
#define DXGetErrorDescription DXGetErrorDescriptionW
43+
44+
//--------------------------------------------------------------------------------------
45+
// DXTrace
46+
//
47+
// Desc: Outputs a formatted error message to the debug stream
48+
//
49+
// Args: WCHAR* strFile The current file, typically passed in using the
50+
// __FILEW__ macro.
51+
// DWORD dwLine The current line number, typically passed in using the
52+
// __LINE__ macro.
53+
// HRESULT hr An HRESULT that will be traced to the debug stream.
54+
// CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
55+
// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
56+
//
57+
// Return: The hr that was passed in.
58+
//--------------------------------------------------------------------------------------
59+
HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
60+
61+
#define DXTrace DXTraceW
62+
63+
//--------------------------------------------------------------------------------------
64+
//
65+
// Helper macros
66+
//
67+
//--------------------------------------------------------------------------------------
68+
#if defined(DEBUG) || defined(_DEBUG)
69+
#define DXTRACE_MSG(str) DXTrace( __FILEW__, (DWORD)__LINE__, 0, str, false )
70+
#define DXTRACE_ERR(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, false )
71+
#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, true )
72+
#else
73+
#define DXTRACE_MSG(str) (0L)
74+
#define DXTRACE_ERR(str,hr) (hr)
75+
#define DXTRACE_ERR_MSGBOX(str,hr) (hr)
76+
#endif
77+
78+
#ifdef __cplusplus
79+
}
80+
#endif //__cplusplus

code/engine.vc2008/3rd party/bugtrap/zlib/zutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
174174
#endif
175175

176176
/* functions */
177-
177+
#define HAVE_VSNPRINTF
178178
#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
179179
# ifndef HAVE_VSNPRINTF
180180
# define HAVE_VSNPRINTF

code/engine.vc2008/3rd party/cximage/CxImage/xfile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define __xfile_h
4343

4444
#if defined (WIN32) || defined (_WIN32_WCE)
45+
#define NOMINMAX
4546
#include <windows.h>
4647
#endif
4748

code/engine.vc2008/3rd party/cximage/CxImage/ximadef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666

6767

6868
#if defined(WIN32) || defined(_WIN32_WCE)
69+
#define NOMINMAX
6970
#include <windows.h>
7071
#include <tchar.h>
7172
#endif

0 commit comments

Comments
 (0)