Skip to content

Commit

Permalink
xrCore: obtaining CPU information was rewritten to C++ instead of ASM
Browse files Browse the repository at this point in the history
fixed "Mixed" configuration build
default directx sdk dxerr.lib replaced by custom project, compatible with visual c++ 2015
  • Loading branch information
Im-dex committed Oct 25, 2016
1 parent d57b70e commit ddf2598
Show file tree
Hide file tree
Showing 38 changed files with 4,668 additions and 530 deletions.
80 changes: 80 additions & 0 deletions code/SDK/include/dxerr/dxerr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
//--------------------------------------------------------------------------------------
// File: DXErr.h
//
// DirectX Error Library
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------

// This version only supports UNICODE.

#pragma once

#if !defined(NOMINMAX)
#define NOMINMAX
#endif

#include <windows.h>
#include <sal.h>

#ifdef __cplusplus
extern "C" {
#endif

//--------------------------------------------------------------------------------------
// DXGetErrorString
//--------------------------------------------------------------------------------------
const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );

#define DXGetErrorString DXGetErrorStringW

//--------------------------------------------------------------------------------------
// DXGetErrorDescription has to be modified to return a copy in a buffer rather than
// the original static string.
//--------------------------------------------------------------------------------------
void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );

#define DXGetErrorDescription DXGetErrorDescriptionW

//--------------------------------------------------------------------------------------
// DXTrace
//
// Desc: Outputs a formatted error message to the debug stream
//
// Args: WCHAR* strFile The current file, typically passed in using the
// __FILEW__ macro.
// DWORD dwLine The current line number, typically passed in using the
// __LINE__ macro.
// HRESULT hr An HRESULT that will be traced to the debug stream.
// CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
//
// Return: The hr that was passed in.
//--------------------------------------------------------------------------------------
HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );

#define DXTrace DXTraceW

//--------------------------------------------------------------------------------------
//
// Helper macros
//
//--------------------------------------------------------------------------------------
#if defined(DEBUG) || defined(_DEBUG)
#define DXTRACE_MSG(str) DXTrace( __FILEW__, (DWORD)__LINE__, 0, str, false )
#define DXTRACE_ERR(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, false )
#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, true )
#else
#define DXTRACE_MSG(str) (0L)
#define DXTRACE_ERR(str,hr) (hr)
#define DXTRACE_ERR_MSGBOX(str,hr) (hr)
#endif

#ifdef __cplusplus
}
#endif //__cplusplus
2 changes: 1 addition & 1 deletion code/engine.vc2008/3rd party/bugtrap/zlib/zutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif

/* functions */

#define HAVE_VSNPRINTF
#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
# ifndef HAVE_VSNPRINTF
# define HAVE_VSNPRINTF
Expand Down
1 change: 1 addition & 0 deletions code/engine.vc2008/3rd party/cximage/CxImage/xfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define __xfile_h

#if defined (WIN32) || defined (_WIN32_WCE)
#define NOMINMAX
#include <windows.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions code/engine.vc2008/3rd party/cximage/CxImage/ximadef.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@


#if defined(WIN32) || defined(_WIN32_WCE)
#define NOMINMAX
#include <windows.h>
#include <tchar.h>
#endif
Expand Down
Loading

0 comments on commit ddf2598

Please sign in to comment.