forked from aqrit/ddwrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
log.cpp
271 lines (246 loc) · 15.2 KB
/
log.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
#include "header.h"
// defines from <dvp.h>
DEFINE_GUID( _IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( _IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( _IID_IDirectDrawVideoPortNotify, 0xA655FB94,0x0589,0x4E57,0xB3,0x33,0x56,0x7A,0x89,0x46,0x8C,0x88);
HANDLE file = INVALID_HANDLE_VALUE;
CRITICAL_SECTION log_lock;
// todo: this function needs to be replaced
void __cdecl Log( const char* fmt, ... )
{
static char buf[1024];
static size_t pos = 0;
OVERLAPPED ol;
int len;
DWORD bytes_written;
if( file == INVALID_HANDLE_VALUE )
{
InitializeCriticalSection(&log_lock);
EnterCriticalSection(&log_lock);
if( file == INVALID_HANDLE_VALUE )
{
file = CreateFile("ddraw.log", GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
);
LeaveCriticalSection(&log_lock);
if( file == INVALID_HANDLE_VALUE ){ return; }
}
}
EnterCriticalSection(&log_lock);
va_list args;
va_start(args,fmt);
len = wvsprintf( buf, fmt, args );
va_end(args);
ol.Offset = pos;
ol.OffsetHigh = 0;
ol.hEvent = NULL;
if( WriteFile(file, buf, len, &bytes_written, &ol) )
{
pos += bytes_written;
}
else
{
// GetLastError();
}
LeaveCriticalSection(&log_lock);
}
void dds32_to_bmp( IDirectDrawSurface* pDDSurface, char* szFileName )
{
BITMAPFILEHEADER bmfh;
BITMAPINFO bmi;
HANDLE hFile;
OVERLAPPED ol;
DDSURFACEDESC ddsd;
ddsd.dwSize = sizeof( ddsd );
if( FAILED( pDDSurface->lpVtbl->Lock( pDDSurface, NULL, &ddsd, DDLOCK_WAIT, NULL) ) ) return;
bmfh.bfType = 0x4d42; // "BM"
bmfh.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + ( ddsd.dwWidth * ddsd.dwHeight * 4 ); // 4 bytes per pixel
bmfh.bfReserved1 = 0;
bmfh.bfReserved2 = 0;
bmfh.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO);
RtlSecureZeroMemory( &bmi, sizeof( bmi ) );
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = ddsd.dwWidth;
bmi.bmiHeader.biHeight = -((signed long)ddsd.dwHeight); // origin is the upper left corner
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biCompression = BI_RGB;
hFile = CreateFile( szFileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0);
if( hFile != NULL )
{
ol.Offset = 0;
ol.OffsetHigh = 0;
ol.hEvent = NULL;
WriteFile( hFile, &bmfh, sizeof( bmfh ), NULL, &ol);
ol.Offset = sizeof( bmfh );
WriteFile( hFile, &bmi, sizeof( bmi ), NULL, &ol);
ol.Offset += sizeof( bmi );
for( DWORD y = 0; y < ddsd.dwHeight; y++ )
{
WriteFile( hFile, (void*)(((uintptr_t)ddsd.lpSurface) + ( ddsd.lPitch * y )), ddsd.dwWidth * 4, NULL, &ol );
ol.Offset += ( ddsd.dwWidth * 4 ); // 4 bytes per pixel
}
CloseHandle(hFile);
}
pDDSurface->lpVtbl->Unlock( pDDSurface, NULL );
}
void LogDDSD( LPDDSURFACEDESC lpDDSurfaceDesc )
{
if( lpDDSurfaceDesc->dwSize >= sizeof( DDSURFACEDESC2 ) ) Log( "DDSD2:\n");
else Log( "DDSD:\n");
DWORD dwKnownFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_BACKBUFFERCOUNT | DDSD_ZBUFFERBITDEPTH |
DDSD_ALPHABITDEPTH | DDSD_LPSURFACE | DDSD_PIXELFORMAT | DDSD_CKDESTOVERLAY | DDSD_CKDESTBLT | DDSD_CKSRCOVERLAY | DDSD_CKSRCBLT |
DDSD_MIPMAPCOUNT | DDSD_REFRESHRATE | DDSD_LINEARSIZE | DDSD_TEXTURESTAGE | DDSD_FVF | DDSD_SRCVBHANDLE | DDSD_DEPTH;
Log( " Flags{ 0x%08X", lpDDSurfaceDesc->dwFlags );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_ALL ) == DDSD_ALL ) Log( ", DDSD_ALL" );
else{
if( lpDDSurfaceDesc->dwFlags & DDSD_CAPS ) Log( ", DDSD_CAPS" );
if( lpDDSurfaceDesc->dwFlags & DDSD_HEIGHT ) Log( ", DDSD_HEIGHT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_WIDTH ) Log( ", DDSD_WIDTH" );
if( lpDDSurfaceDesc->dwFlags & DDSD_PITCH ) Log( ", DDSD_PITCH" );
if( lpDDSurfaceDesc->dwFlags & DDSD_BACKBUFFERCOUNT ) Log( ", DDSD_BACKBUFFERCOUNT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_ZBUFFERBITDEPTH ) Log( ", DDSD_ZBUFFERBITDEPTH" );
if( lpDDSurfaceDesc->dwFlags & DDSD_ALPHABITDEPTH ) Log( ", DDSD_ALPHABITDEPTH" );
if( lpDDSurfaceDesc->dwFlags & DDSD_LPSURFACE ) Log( ", DDSD_LPSURFACE" );
if( lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT ) Log( ", DDSD_PIXELFORMAT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_CKDESTOVERLAY ) Log( ", DDSD_CKDESTOVERLAY" );
if( lpDDSurfaceDesc->dwFlags & DDSD_CKDESTBLT ) Log( ", DDSD_CKDESTBLT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_CKSRCOVERLAY ) Log( ", DDSD_CKSRCOVERLAY" );
if( lpDDSurfaceDesc->dwFlags & DDSD_CKSRCBLT ) Log( ", DDSD_CKSRCBLT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_MIPMAPCOUNT ) Log( ", DDSD_MIPMAPCOUNT" );
if( lpDDSurfaceDesc->dwFlags & DDSD_REFRESHRATE ) Log( ", DDSD_REFRESHRATE" );
if( lpDDSurfaceDesc->dwFlags & DDSD_LINEARSIZE ) Log( ", DDSD_LINEARSIZE" );
if( lpDDSurfaceDesc->dwFlags & DDSD_TEXTURESTAGE ) Log( ", DDSD_TEXTURESTAGE" );
if( lpDDSurfaceDesc->dwFlags & DDSD_FVF ) Log( ", DDSD_FVF" );
if( lpDDSurfaceDesc->dwFlags & DDSD_SRCVBHANDLE ) Log( ", DDSD_SRCVBHANDLE" );
if( lpDDSurfaceDesc->dwFlags & DDSD_DEPTH ) Log( ", DDSD_DEPTH" );
if( lpDDSurfaceDesc->dwFlags & ~( dwKnownFlags ) ) Log( ", UNKNOWN!! 0x%08X", (lpDDSurfaceDesc->dwFlags & ~( dwKnownFlags )) );
}
Log( " }\n" );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_CAPS ) || ( lpDDSurfaceDesc->dwFlags == DDSD_ALL ) )
{
Log( " Caps1{ 0x%08X", lpDDSurfaceDesc->ddsCaps.dwCaps );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_RESERVED1 ) Log( ", DDSCAPS_RESERVED1" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_ALPHA ) Log( ", DDSCAPS_ALPHA" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_BACKBUFFER ) Log( ", DDSCAPS_BACKBUFFER" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_COMPLEX ) Log( ", DDSCAPS_COMPLEX" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_FLIP ) Log( ", DDSCAPS_FLIP" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER ) Log( ", DDSCAPS_FRONTBUFFER" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN ) Log( ", DDSCAPS_OFFSCREENPLAIN" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_OVERLAY ) Log( ", DDSCAPS_OVERLAY" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PALETTE ) Log( ", DDSCAPS_PALETTE" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE ) Log( ", DDSCAPS_PRIMARYSURFACE" );
//if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_RESERVED3 ) Log( ", DDSCAPS_RESERVED3" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY ) Log( ", DDSCAPS_SYSTEMMEMORY" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_TEXTURE ) Log( ", DDSCAPS_TEXTURE" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE ) Log( ", DDSCAPS_3DDEVICE" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY ) Log( ", DDSCAPS_VIDEOMEMORY" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_VISIBLE ) Log( ", DDSCAPS_VISIBLE" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_WRITEONLY ) Log( ", DDSCAPS_WRITEONLY" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER ) Log( ", DDSCAPS_ZBUFFER" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_OWNDC ) Log( ", DDSCAPS_OWNDC" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_LIVEVIDEO ) Log( ", DDSCAPS_LIVEVIDEO" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_HWCODEC ) Log( ", DDSCAPS_HWCODEC" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_MODEX ) Log( ", DDSCAPS_MODEX" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_MIPMAP ) Log( ", DDSCAPS_MIPMAP" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_RESERVED2 ) Log( ", DDSCAPS_RESERVED2" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD ) Log( ", DDSCAPS_ALLOCONLOAD" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_VIDEOPORT ) Log( ", DDSCAPS_VIDEOPORT" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM ) Log( ", DDSCAPS_LOCALVIDMEM" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_NONLOCALVIDMEM ) Log( ", DDSCAPS_NONLOCALVIDMEM" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_STANDARDVGAMODE ) Log( ", DDSCAPS_STANDARDVGAMODE" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_OPTIMIZED ) Log( ", DDSCAPS_OPTIMIZED" );
if( lpDDSurfaceDesc->ddsCaps.dwCaps & 0x03000000 ) Log( ", UNKNOWN!! 0x%08X", ( lpDDSurfaceDesc->ddsCaps.dwCaps & 0x03000000 ) );
Log( " }\n" );
}
Log( " " );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_WIDTH ) || ( lpDDSurfaceDesc->dwFlags == DDSD_ALL ) )
Log( "width: %d ", lpDDSurfaceDesc->dwWidth );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_HEIGHT ) || ( lpDDSurfaceDesc->dwFlags == DDSD_ALL ) )
Log( "height: %d ", lpDDSurfaceDesc->dwHeight );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_BACKBUFFERCOUNT ) || ( lpDDSurfaceDesc->dwFlags == DDSD_ALL ) )
Log( "backbuffers: %d ", lpDDSurfaceDesc->dwBackBufferCount );
Log( "\n" );
if( ( lpDDSurfaceDesc->dwFlags & DDSD_PIXELFORMAT ) || ( lpDDSurfaceDesc->dwFlags == DDSD_ALL ) )
{
Log( " DDPF:\n" );
Log( " Flags{ 0x%08X", lpDDSurfaceDesc->ddpfPixelFormat.dwFlags );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_ALPHAPIXELS ) Log( ", DDPF_ALPHAPIXELS" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_ALPHA ) Log( ", DDPF_ALPHA" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_FOURCC ) Log( ", DDPF_FOURCC" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED4 ) Log( ", DDPF_PALETTEINDEXED4" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXEDTO8 ) Log( ", DDPF_PALETTEINDEXEDTO8" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8 ) Log( ", DDPF_PALETTEINDEXED8" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_RGB ) Log( ", DDPF_RGB" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_COMPRESSED ) Log( ", DDPF_COMPRESSED" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_RGBTOYUV ) Log( ", DDPF_RGBTOYUV" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_YUV ) Log( ", DDPF_YUV" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_ZBUFFER ) Log( ", DDPF_ZBUFFER" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED1 ) Log( ", DDPF_PALETTEINDEXED1" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED2 ) Log( ", DDPF_PALETTEINDEXED2" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_ZPIXELS ) Log( ", DDPF_ZPIXELS" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_STENCILBUFFER ) Log( ", DDPF_STENCILBUFFER" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_ALPHAPREMULT ) Log( ", DDPF_ALPHAPREMULT" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_LUMINANCE ) Log( ", DDPF_LUMINANCE" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_BUMPLUMINANCE ) Log( ", DDPF_BUMPLUMINANCE" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & DDPF_BUMPDUDV ) Log( ", DDPF_BUMPDUDV" );
if( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & 0xFFF10000 ) Log( ", UNKNOWN!! 0x%08X", ( lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & 0xFFF10000 ) );
Log( " }\n" );
}
}
void LogGUID(const GUID& riid)
{
if ( riid == IID_IUnknown ) Log( " IID_IUnknown\n" );
else if ( riid == IID_IClassFactory ) Log( " IID_IClassFactory\n" );
else if ( riid == IID_IDirectDraw ) Log( " IID_IDirectDraw\n" );
else if ( riid == IID_IDirectDraw2 ) Log( " IID_IDirectDraw2\n" );
else if ( riid == IID_IDirectDraw4 ) Log( " IID_IDirectDraw4\n" );
else if ( riid == IID_IDirectDraw7 ) Log( " IID_IDirectDraw7\n" );
else if ( riid == IID_IDirectDrawSurface ) Log( " IID_IDirectDrawSurface\n" );
else if ( riid == IID_IDirectDrawSurface2 ) Log( " IID_IDirectDrawSurface2\n" );
else if ( riid == IID_IDirectDrawSurface3 ) Log( " IID_IDirectDrawSurface3\n" );
else if ( riid == IID_IDirectDrawSurface4 ) Log( " IID_IDirectDrawSurface4\n" );
else if ( riid == IID_IDirectDrawSurface7 ) Log( " IID_IDirectDrawSurface7\n" );
else if ( riid == IID_IDirectDrawClipper ) Log( " IID_IDirectDrawClipper\n" );
else if ( riid == IID_IDirectDrawPalette ) Log( " IID_IDirectDrawPalette\n" );
else if ( riid == IID_IDirectDrawColorControl ) Log( " IID_IDirectDrawColorControl\n" );
else if ( riid == IID_IDirectDrawGammaControl ) Log( " IID_IDirectDrawGammaControl\n" );
// unsupported //
else if ( riid == _IID_IDDVideoPortContainer ) Log( "IID_IDDVideoPortContainer\n" );
else if ( riid == _IID_IDirectDrawVideoPort ) Log( "IID_IDirectDrawVideoPort\n" );
else if ( riid == _IID_IDirectDrawVideoPortNotify ) Log( "IID_IDirectDrawVideoPortNotify\n" );
else if ( riid == IID_IDirect3D ) Log( "IID_IDirect3D\n" );
else if ( riid == IID_IDirect3D2 ) Log( "IID_IDirect3D2\n" );
else if ( riid == IID_IDirect3D3 ) Log( "IID_IDirect3D3\n" );
else if ( riid == IID_IDirect3D7 ) Log( "IID_IDirect3D7\n" );
else if ( riid == IID_IDirect3DTexture ) Log( "IID_IDirect3DTexture\n" );
else if ( riid == IID_IDirect3DTexture2 ) Log( "IID_IDirect3DTexture2\n" );
else if ( riid == IID_IDirect3DRampDevice ) Log( "IID_IDirect3DRampDevice\n" );
else if ( riid == IID_IDirect3DRGBDevice ) Log( "IID_IDirect3DRGBDevice\n" );
else if ( riid == IID_IDirect3DHALDevice ) Log( "IID_IDirect3DHALDevice\n" );
else if ( riid == IID_IDirect3DMMXDevice ) Log( "IID_IDirect3DMMXDevice\n" );
else if ( riid == IID_IDirect3DRefDevice ) Log( "IID_IDirect3DRefDevice\n" );
else if ( riid == IID_IDirect3DNullDevice ) Log( "IID_IDirect3DNullDevice\n" );
else if ( riid == IID_IDirect3DTnLHalDevice ) Log( "IID_IDirect3DTnLHalDevice\n" );
else if ( riid == IID_IDirect3DDevice ) Log( "IID_IDirect3DDevice\n" );
else if ( riid == IID_IDirect3DDevice2 ) Log( "IID_IDirect3DDevice2\n" );
else if ( riid == IID_IDirect3DDevice3 ) Log( "IID_IDirect3DDevice3\n" );
else if ( riid == IID_IDirect3DDevice7 ) Log( "IID_IDirect3DDevice7\n" );
else if ( riid == IID_IDirect3DLight ) Log( "IID_IDirect3DLight\n" );
else if ( riid == IID_IDirect3DMaterial ) Log( "IID_IDirect3DMaterial\n" );
else if ( riid == IID_IDirect3DMaterial2 ) Log( "IID_IDirect3DMaterial2\n" );
else if ( riid == IID_IDirect3DMaterial3 ) Log( "IID_IDirect3DMaterial3\n" );
else if ( riid == IID_IDirect3DExecuteBuffer ) Log( "IID_IDirect3DExecuteBuffer\n" );
else if ( riid == IID_IDirect3DViewport ) Log( "IID_IDirect3DViewport\n" );
else if ( riid == IID_IDirect3DViewport2 ) Log( "IID_IDirect3DViewport2\n" );
else if ( riid == IID_IDirect3DViewport3 ) Log( "IID_IDirect3DViewport3\n" );
else if ( riid == IID_IDirect3DVertexBuffer ) Log( "IID_IDirect3DVertexBuffer\n" );
else if ( riid == IID_IDirect3DVertexBuffer7 ) Log( "IID_IDirect3DVertexBuffer7\n" );
else
{
Log( ">>>> Unknown GUID: 0x%08X,0x%04X,0x%04X,0x%02X,0x%02X,0x%02X,0x%02X,0x%02X,0x%02X,0x%02X,0x%02X <<<<\n",
riid.Data1, riid.Data2, riid.Data3, riid.Data4[0], riid.Data4[1], riid.Data4[2], riid.Data4[3], riid.Data4[4],
riid.Data4[5], riid.Data4[6], riid.Data4[7]
);
}
}