~ubuntu-branches/ubuntu/jaunty/mesa/jaunty

« back to all changes in this revision

Viewing changes to src/mesa/drivers/windows/gldirect/dx8/gld_dxerr8.h

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-23 10:20:24 UTC
  • mfrom: (1.2.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090123102024-1f3kmb3aea7wzk67
Tags: 7.3~rc3-1ubuntu1
* Merge with Debian experimental.
* Drop 102_dont_vblank.patch, since the new drm code in the kernel
  fixes the bugs that it worked around.
* Bump the build-dependency of libdrm to 2.4.4. It's the first version
  with necessary changes to build this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*==========================================================================;
2
 
 *
3
 
 *
4
 
 *  File:   dxerr8.h
5
 
 *  Content:    DirectX Error Library Include File
6
 
 *
7
 
 ****************************************************************************/
8
 
 
9
 
#ifndef _GLD_DXERR8_H_
10
 
#define _GLD_DXERR8_H_
11
 
 
12
 
 
13
 
#include <d3d8.h>
14
 
 
15
 
//
16
 
//  DXGetErrorString8
17
 
//  
18
 
//  Desc:  Converts an DirectX HRESULT to a string 
19
 
//
20
 
//  Args:  HRESULT hr   Can be any error code from
21
 
//                      DPLAY D3D8 D3DX8 DMUSIC DSOUND
22
 
//
23
 
//  Return: Converted string 
24
 
//
25
 
const char*  __stdcall DXGetErrorString8A(HRESULT hr);
26
 
const WCHAR* __stdcall DXGetErrorString8W(HRESULT hr);
27
 
 
28
 
#ifdef UNICODE
29
 
    #define DXGetErrorString8 DXGetErrorString8W
30
 
#else
31
 
    #define DXGetErrorString8 DXGetErrorString8A
32
 
#endif 
33
 
 
34
 
 
35
 
//
36
 
//  DXTrace
37
 
//
38
 
//  Desc:  Outputs a formatted error message to the debug stream
39
 
//
40
 
//  Args:  CHAR* strFile   The current file, typically passed in using the 
41
 
//                         __FILE__ macro.
42
 
//         DWORD dwLine    The current line number, typically passed in using the 
43
 
//                         __LINE__ macro.
44
 
//         HRESULT hr      An HRESULT that will be traced to the debug stream.
45
 
//         CHAR* strMsg    A string that will be traced to the debug stream (may be NULL)
46
 
//         BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
47
 
//
48
 
//  Return: The hr that was passed in.  
49
 
//
50
 
//HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox = FALSE );
51
 
//HRESULT __stdcall DXTraceW( char* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox = FALSE );
52
 
HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox);
53
 
HRESULT __stdcall DXTraceW( char* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox);
54
 
 
55
 
#ifdef UNICODE
56
 
    #define DXTrace DXTraceW
57
 
#else
58
 
    #define DXTrace DXTraceA
59
 
#endif 
60
 
 
61
 
 
62
 
//
63
 
// Helper macros
64
 
//
65
 
#if defined(DEBUG) | defined(_DEBUG)
66
 
    #define DXTRACE_MSG(str)              DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
67
 
    #define DXTRACE_ERR(str,hr)           DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
68
 
    #define DXTRACE_ERR_NOMSGBOX(str,hr)  DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
69
 
#else
70
 
    #define DXTRACE_MSG(str)              (0L)
71
 
    #define DXTRACE_ERR(str,hr)           (hr)
72
 
    #define DXTRACE_ERR_NOMSGBOX(str,hr)  (hr)
73
 
#endif
74
 
 
75
 
 
76
 
#endif
77