OSDN Git Service

作業部屋#50802 画面キャプチャができなくなっていた問題を暫定対応(F12キー固定で対応中)
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / external / Effects11 / d3dx11dbg.cpp
1 ///////////////////////////////////////////////////////////////////////////
2 //
3 //  Copyright (C) Microsoft Corporation.  All Rights Reserved.
4 //
5 //  File:       d3dx11dbg.cpp
6 //  Content:    D3DX11 Effects debugging functions
7 //
8 ///////////////////////////////////////////////////////////////////////////
9
10 #include "pchfx.h"
11
12
13 #ifdef FXDPF
14
15 //
16 // DPF
17 //
18
19 void cdecl D3DXDebugPrintf(UINT lvl, LPCSTR szFormat, ...)
20 {
21     static UINT uDebugLevel = (UINT) -1;
22
23     char strA[4096];
24     char strB[4096];
25
26     va_list ap;
27     va_start(ap, szFormat);
28     StringCchVPrintfA(strA, sizeof(strA), szFormat, ap);
29     strA[4095] = '\0';
30     va_end(ap);
31
32     StringCchPrintfA(strB, sizeof(strB), "Effects11: %s\r\n", strA);
33
34     strB[4095] = '\0';
35
36     OutputDebugStringA(strB);
37 }
38 #else
39 // This is defined so warning LNK4211 is not generated (object file has no public symbols)
40 void cdecl D3DXDebugPrintf(UINT lvl, LPCSTR szFormat, ...) {}
41 #endif
42
43
44 //
45 // D3DXASSERT
46 //
47
48 #ifdef _DEBUG
49
50 int WINAPI D3DXDebugAssert(LPCSTR szFile, int nLine, LPCSTR szCondition)
51 {
52     char str[512];
53
54     // Print message to debug console
55     StringCchPrintfA(str, sizeof(str), "Assertion failure! (%s %d): %s\r\n", szFile, nLine, szCondition);
56     str[511] = 0;
57     OutputDebugStringA(str);
58
59     return 0;
60 }
61 #endif
62