mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
adding check if it is IID_IDirectDraw7 on right place and learn it is lpDD->QueryInterface that optain the d3d interface.
svn path=/trunk/; revision=25015
This commit is contained in:
parent
1c7d9c3cb9
commit
1c4a115ec0
|
@ -28,6 +28,10 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
|
/* fixme
|
||||||
|
the D3D object cab be optain from here
|
||||||
|
Direct3D7
|
||||||
|
*/
|
||||||
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
||||||
{
|
{
|
||||||
/* DirectDraw7 Vtable */
|
/* DirectDraw7 Vtable */
|
||||||
|
|
|
@ -620,11 +620,11 @@ DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLay
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define DX_WINDBG_trace()
|
//#define DX_WINDBG_trace()
|
||||||
#define DX_STUB
|
//#define DX_STUB
|
||||||
#define DX_STUB_DD_OK return DD_OK;
|
//#define DX_STUB_DD_OK return DD_OK;
|
||||||
#define DX_STUB_str(x) printf("%s",x);
|
//#define DX_STUB_str(x) printf("%s",x);
|
||||||
#define DX_WINDBG_trace_res
|
//#define DX_WINDBG_trace_res
|
||||||
|
|
||||||
/*
|
/*
|
||||||
use this if want doing a trace from a program
|
use this if want doing a trace from a program
|
||||||
|
@ -635,58 +635,58 @@ DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLay
|
||||||
This marco does not create warings when you compile
|
This marco does not create warings when you compile
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define DX_STUB \
|
#define DX_STUB \
|
||||||
//{ \
|
{ \
|
||||||
// static BOOL firstcall = TRUE; \
|
static BOOL firstcall = TRUE; \
|
||||||
// if (firstcall) \
|
if (firstcall) \
|
||||||
// { \
|
{ \
|
||||||
// char buffer[1024]; \
|
char buffer[1024]; \
|
||||||
// sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
||||||
// OutputDebugStringA(buffer); \
|
OutputDebugStringA(buffer); \
|
||||||
// firstcall = FALSE; \
|
firstcall = FALSE; \
|
||||||
// } \
|
} \
|
||||||
//} \
|
} \
|
||||||
// return DDERR_UNSUPPORTED;
|
return DDERR_UNSUPPORTED;
|
||||||
//
|
|
||||||
//#define DX_STUB_DD_OK \
|
#define DX_STUB_DD_OK \
|
||||||
//{ \
|
{ \
|
||||||
// static BOOL firstcall = TRUE; \
|
static BOOL firstcall = TRUE; \
|
||||||
// if (firstcall) \
|
if (firstcall) \
|
||||||
// { \
|
{ \
|
||||||
// char buffer[1024]; \
|
char buffer[1024]; \
|
||||||
// sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
||||||
// OutputDebugStringA(buffer); \
|
OutputDebugStringA(buffer); \
|
||||||
// firstcall = FALSE; \
|
firstcall = FALSE; \
|
||||||
// } \
|
} \
|
||||||
//} \
|
} \
|
||||||
// return DD_OK;
|
return DD_OK;
|
||||||
//
|
|
||||||
//
|
|
||||||
//#define DX_STUB_str(x) \
|
#define DX_STUB_str(x) \
|
||||||
// { \
|
{ \
|
||||||
// char buffer[1024]; \
|
char buffer[1024]; \
|
||||||
// sprintf ( buffer, "Function %s %s (%s:%d)\n", __FUNCTION__,x,__FILE__,__LINE__ ); \
|
sprintf ( buffer, "Function %s %s (%s:%d)\n", __FUNCTION__,x,__FILE__,__LINE__ ); \
|
||||||
// OutputDebugStringA(buffer); \
|
OutputDebugStringA(buffer); \
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//#define DX_WINDBG_trace() \
|
#define DX_WINDBG_trace() \
|
||||||
// static BOOL firstcallx = TRUE; \
|
static BOOL firstcallx = TRUE; \
|
||||||
// if (firstcallx) \
|
if (firstcallx) \
|
||||||
// { \
|
{ \
|
||||||
// char buffer[1024]; \
|
char buffer[1024]; \
|
||||||
// sprintf ( buffer, "Enter Function %s (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
sprintf ( buffer, "Enter Function %s (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
|
||||||
// OutputDebugStringA(buffer); \
|
OutputDebugStringA(buffer); \
|
||||||
// firstcallx = TRUE; \
|
firstcallx = TRUE; \
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//#define DX_WINDBG_trace_res(width,height,bpp) \
|
#define DX_WINDBG_trace_res(width,height,bpp) \
|
||||||
// static BOOL firstcallxx = TRUE; \
|
static BOOL firstcallxx = TRUE; \
|
||||||
// if (firstcallxx) \
|
if (firstcallxx) \
|
||||||
// { \
|
{ \
|
||||||
// char buffer[1024]; \
|
char buffer[1024]; \
|
||||||
// sprintf ( buffer, "Setmode have been req width=%d, height=%d bpp=%d\n",width,height,bpp); \
|
sprintf ( buffer, "Setmode have been req width=%d, height=%d bpp=%d\n",width,height,bpp); \
|
||||||
// OutputDebugStringA(buffer); \
|
OutputDebugStringA(buffer); \
|
||||||
// firstcallxx = FALSE; \
|
firstcallxx = FALSE; \
|
||||||
// }
|
}
|
||||||
|
|
||||||
#endif /* __DDRAW_PRIVATE */
|
#endif /* __DDRAW_PRIVATE */
|
||||||
|
|
|
@ -882,13 +882,17 @@ Create_DirectDraw (LPGUID pGUID,
|
||||||
{
|
{
|
||||||
LPDDRAWI_DIRECTDRAW_INT This;
|
LPDDRAWI_DIRECTDRAW_INT This;
|
||||||
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
|
if (!IsEqualGUID(&IID_IDirectDraw7, id))
|
||||||
|
{
|
||||||
|
return DDERR_INVALIDDIRECTDRAWGUID;
|
||||||
|
}
|
||||||
|
|
||||||
This = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
|
This = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
if (This == NULL)
|
if (This == NULL)
|
||||||
{
|
{
|
||||||
return E_OUTOFMEMORY;
|
return DDERR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->lpLcl = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
|
This->lpLcl = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
|
|
Loading…
Reference in a new issue