Commit 20a42b4c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Add / improve TRACEs.

parent 4378d4b3
......@@ -49,6 +49,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
static HRESULT WINAPI IDirectDrawClipperImpl_QueryInterface(
LPDIRECTDRAWCLIPPER iface, REFIID riid, LPVOID* ppvObj
) {
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppvObj);
if (IsEqualGUID(&IID_IUnknown, riid)
|| IsEqualGUID(&IID_IDirectDrawClipper, riid))
{
......@@ -73,7 +76,7 @@ static ULONG WINAPI IDirectDrawClipperImpl_AddRef( LPDIRECTDRAWCLIPPER iface )
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -89,7 +92,7 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) {
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (ref == 0)
{
......@@ -122,7 +125,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
) {
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%08x,%p)\n", This, dwFlags, hWnd);
TRACE("iface %p, flags %#x, window %p.\n", iface, dwFlags, hWnd);
EnterCriticalSection(&ddraw_cs);
hr = IWineD3DClipper_SetHWnd(This->wineD3DClipper,
......@@ -160,7 +164,9 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
{
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
HRESULT hr;
TRACE("(%p,%p,%p,%p)\n", This, lpRect, lpClipList, lpdwSize);
TRACE("iface %p, rect %s, clip_list %p, clip_list_size %p.\n",
iface, wine_dbgstr_rect(lpRect), lpClipList, lpdwSize);
EnterCriticalSection(&ddraw_cs);
hr = IWineD3DClipper_GetClipList(This->wineD3DClipper,
......@@ -191,6 +197,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList(
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
HRESULT hr;
TRACE("iface %p, clip_list %p, flags %#x.\n", iface, lprgn, dwFlag);
EnterCriticalSection(&ddraw_cs);
hr = IWineD3DClipper_SetClipList(This->wineD3DClipper,
lprgn,
......@@ -215,7 +223,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
) {
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%p)\n", This, hWndPtr);
TRACE("iface %p, window %p.\n", iface, hWndPtr);
EnterCriticalSection(&ddraw_cs);
hr = IWineD3DClipper_GetHWnd(This->wineD3DClipper,
......@@ -242,7 +251,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_Initialize(
LPDIRECTDRAWCLIPPER iface, LPDIRECTDRAW lpDD, DWORD dwFlags
) {
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
TRACE("(%p)->(%p,0x%08x)\n", This, lpDD, dwFlags);
TRACE("iface %p, ddraw %p, flags %#x.\n", iface, lpDD, dwFlags);
EnterCriticalSection(&ddraw_cs);
if (This->initialized)
......@@ -271,8 +281,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_Initialize(
static HRESULT WINAPI IDirectDrawClipperImpl_IsClipListChanged(
LPDIRECTDRAWCLIPPER iface, BOOL* lpbChanged
) {
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
FIXME("(%p)->(%p),stub!\n",This,lpbChanged);
FIXME("iface %p, changed %p stub!\n", iface, lpbChanged);
/* XXX What is safest? */
*lpbChanged = FALSE;
......
......@@ -24,7 +24,7 @@
#include "ddraw_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d7);
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
/*****************************************************************************
* light_update
......@@ -108,14 +108,11 @@ void light_deactivate(IDirect3DLightImpl *light)
* Returns:
* E_NOINTERFACE, because it's a stub
*****************************************************************************/
static HRESULT WINAPI
IDirect3DLightImpl_QueryInterface(IDirect3DLight *iface,
REFIID riid,
void **obp)
static HRESULT WINAPI IDirect3DLightImpl_QueryInterface(IDirect3DLight *iface, REFIID riid, void **object)
{
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
FIXME("(%p)->(%s,%p): stub!\n", This, debugstr_guid(riid), obp);
*obp = NULL;
FIXME("iface %p, riid %s, object %p stub!\n", iface, debugstr_guid(riid), object);
*object = NULL;
return E_NOINTERFACE;
}
......@@ -134,7 +131,7 @@ IDirect3DLightImpl_AddRef(IDirect3DLight *iface)
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -155,7 +152,7 @@ IDirect3DLightImpl_Release(IDirect3DLight *iface)
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......@@ -181,13 +178,10 @@ IDirect3DLightImpl_Release(IDirect3DLight *iface)
* D3D_OK
*
*****************************************************************************/
static HRESULT WINAPI
IDirect3DLightImpl_Initialize(IDirect3DLight *iface,
IDirect3D *lpDirect3D)
static HRESULT WINAPI IDirect3DLightImpl_Initialize(IDirect3DLight *iface, IDirect3D *d3d)
{
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
IDirectDrawImpl *d3d = lpDirect3D ? ddraw_from_d3d1(lpDirect3D) : NULL;
TRACE("(%p)->(%p) no-op...\n", This, d3d);
TRACE("iface %p, d3d %p.\n", iface, d3d);
return D3D_OK;
}
......@@ -219,8 +213,11 @@ IDirect3DLightImpl_SetLight(IDirect3DLight *iface,
{
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
LPD3DLIGHT7 light7 = &(This->light7);
TRACE("(%p)->(%p)\n", This, lpLight);
if (TRACE_ON(d3d7)) {
TRACE("iface %p, light %p.\n", iface, lpLight);
if (TRACE_ON(ddraw))
{
TRACE(" Light definition :\n");
dump_light((LPD3DLIGHT2) lpLight);
}
......@@ -274,8 +271,11 @@ IDirect3DLightImpl_GetLight(IDirect3DLight *iface,
D3DLIGHT *lpLight)
{
IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface;
TRACE("(%p/%p)->(%p)\n", This, iface, lpLight);
if (TRACE_ON(d3d7)) {
TRACE("iface %p, light %p.\n", iface, lpLight);
if (TRACE_ON(ddraw))
{
TRACE(" Returning light definition :\n");
dump_light(&This->light);
}
......
......@@ -225,7 +225,8 @@ DDRAW_Create(const GUID *guid,
IDirectDrawImpl *This;
HRESULT hr;
TRACE("(%s,%p,%p)\n", debugstr_guid(guid), DD, UnkOuter);
TRACE("driver_guid %s, ddraw %p, outer_unknown %p, interface_iid %s.\n",
debugstr_guid(guid), DD, UnkOuter, debugstr_guid(iid));
*DD = NULL;
......@@ -292,7 +293,9 @@ DirectDrawCreate(GUID *GUID,
IUnknown *UnkOuter)
{
HRESULT hr;
TRACE("(%s,%p,%p)\n", debugstr_guid(GUID), DD, UnkOuter);
TRACE("driver_guid %s, ddraw %p, outer_unknown %p.\n",
debugstr_guid(GUID), DD, UnkOuter);
EnterCriticalSection(&ddraw_cs);
hr = DDRAW_Create(GUID, (void **) DD, UnkOuter, &IID_IDirectDraw);
......@@ -316,7 +319,9 @@ DirectDrawCreateEx(GUID *GUID,
IUnknown *UnkOuter)
{
HRESULT hr;
TRACE("(%s,%p,%s,%p)\n", debugstr_guid(GUID), DD, debugstr_guid(iid), UnkOuter);
TRACE("driver_guid %s, ddraw %p, interface_iid %s, outer_unknown %p.\n",
debugstr_guid(GUID), DD, debugstr_guid(iid), UnkOuter);
if (!IsEqualGUID(iid, &IID_IDirectDraw7))
return DDERR_INVALIDPARAMS;
......@@ -347,11 +352,9 @@ DirectDrawCreateEx(GUID *GUID,
*
*
***********************************************************************/
HRESULT WINAPI
DirectDrawEnumerateA(LPDDENUMCALLBACKA Callback,
LPVOID Context)
HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA Callback, void *Context)
{
TRACE("(%p, %p)\n", Callback, Context);
TRACE("callback %p, context %p.\n", Callback, Context);
TRACE(" Enumerating default DirectDraw HAL interface\n");
/* We only have one driver */
......@@ -381,12 +384,9 @@ DirectDrawEnumerateA(LPDDENUMCALLBACKA Callback,
* The Flag member is not supported right now.
*
***********************************************************************/
HRESULT WINAPI
DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback,
LPVOID Context,
DWORD Flags)
HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback, void *Context, DWORD Flags)
{
TRACE("(%p, %p, 0x%08x)\n", Callback, Context, Flags);
TRACE("callback %p, context %p, flags %#x.\n", Callback, Context, Flags);
if (Flags & ~(DDENUM_ATTACHEDSECONDARYDEVICES |
DDENUM_DETACHEDSECONDARYDEVICES |
......@@ -424,13 +424,11 @@ DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback,
* This function is not implemented on Windows.
*
***********************************************************************/
HRESULT WINAPI
DirectDrawEnumerateW(LPDDENUMCALLBACKW Callback,
LPVOID Context)
HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW callback, void *context)
{
TRACE("(%p, %p)\n", Callback, Context);
TRACE("callback %p, context %p.\n", callback, context);
if (!Callback)
if (!callback)
return DDERR_INVALIDPARAMS;
else
return DDERR_UNSUPPORTED;
......@@ -443,12 +441,9 @@ DirectDrawEnumerateW(LPDDENUMCALLBACKW Callback,
* This function is not implemented on Windows.
*
***********************************************************************/
HRESULT WINAPI
DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW Callback,
LPVOID Context,
DWORD Flags)
HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW callback, void *context, DWORD flags)
{
TRACE("(%p, %p, 0x%x)\n", Callback, Context, Flags);
TRACE("callback %p, context %p, flags %#x.\n", callback, context, flags);
return DDERR_UNSUPPORTED;
}
......@@ -477,7 +472,7 @@ CF_CreateDirectDraw(IUnknown* UnkOuter, REFIID iid,
{
HRESULT hr;
TRACE("(%p,%s,%p)\n", UnkOuter, debugstr_guid(iid), obj);
TRACE("outer_unknown %p, riid %s, object %p.\n", UnkOuter, debugstr_guid(iid), obj);
EnterCriticalSection(&ddraw_cs);
hr = DDRAW_Create(NULL, obj, UnkOuter, iid);
......@@ -506,6 +501,8 @@ CF_CreateDirectDrawClipper(IUnknown* UnkOuter, REFIID riid,
HRESULT hr;
IDirectDrawClipper *Clip;
TRACE("outer_unknown %p, riid %s, object %p.\n", UnkOuter, debugstr_guid(riid), obj);
EnterCriticalSection(&ddraw_cs);
hr = DirectDrawCreateClipper(0, &Clip, UnkOuter);
if (hr != DD_OK)
......@@ -549,7 +546,7 @@ IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface,
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obj);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory))
......@@ -578,7 +575,7 @@ IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface)
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %d.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -598,7 +595,8 @@ IDirectDrawClassFactoryImpl_Release(IClassFactory *iface)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %d.\n", This, ref+1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (ref == 0)
HeapFree(GetProcessHeap(), 0, This);
......@@ -627,7 +625,8 @@ IDirectDrawClassFactoryImpl_CreateInstance(IClassFactory *iface,
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
TRACE("(%p)->(%p,%s,%p)\n",This,UnkOuter,debugstr_guid(riid),obj);
TRACE("iface %p, outer_unknown %p, riid %s, object %p.\n",
iface, UnkOuter, debugstr_guid(riid), obj);
return This->pfnCreateInstance(UnkOuter, riid, obj);
}
......@@ -644,11 +643,10 @@ IDirectDrawClassFactoryImpl_CreateInstance(IClassFactory *iface,
* S_OK, because it's a stub
*
*******************************************************************************/
static HRESULT WINAPI
IDirectDrawClassFactoryImpl_LockServer(IClassFactory *iface,BOOL dolock)
static HRESULT WINAPI IDirectDrawClassFactoryImpl_LockServer(IClassFactory *iface, BOOL dolock)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
FIXME("(%p)->(%d),stub!\n",This,dolock);
FIXME("iface %p, dolock %#x stub!\n", iface, dolock);
return S_OK;
}
......@@ -686,7 +684,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
unsigned int i;
IClassFactoryImpl *factory;
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
TRACE("rclsid %s, riid %s, object %p.\n",
debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if ( !IsEqualGUID( &IID_IClassFactory, riid )
&& ! IsEqualGUID( &IID_IUnknown, riid) )
......@@ -726,6 +725,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
TRACE("\n");
return S_FALSE;
}
......
......@@ -24,8 +24,7 @@
#include "ddraw_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d7);
WINE_DECLARE_DEBUG_CHANNEL(ddraw_thunk);
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
static void dump_material(const D3DMATERIAL *mat)
{
......@@ -67,7 +66,8 @@ IDirect3DMaterialImpl_QueryInterface(IDirect3DMaterial3 *iface,
LPVOID* obp)
{
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obp);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp);
*obp = NULL;
......@@ -114,7 +114,7 @@ IDirect3DMaterialImpl_AddRef(IDirect3DMaterial3 *iface)
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -135,7 +135,7 @@ IDirect3DMaterialImpl_Release(IDirect3DMaterial3 *iface)
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (!ref)
{
......@@ -172,9 +172,7 @@ static HRESULT WINAPI
IDirect3DMaterialImpl_Initialize(IDirect3DMaterial *iface,
IDirect3D *Direct3D)
{
IDirect3DMaterialImpl *This = material_from_material1(iface);
TRACE("(%p)->(%p) no-op...!\n", This, Direct3D);
TRACE("iface %p, d3d %p.\n", iface, Direct3D);
return D3D_OK;
}
......@@ -192,8 +190,7 @@ IDirect3DMaterialImpl_Initialize(IDirect3DMaterial *iface,
static HRESULT WINAPI
IDirect3DMaterialImpl_Reserve(IDirect3DMaterial *iface)
{
IDirect3DMaterialImpl *This = material_from_material1(iface);
TRACE("(%p)->() not implemented\n", This);
TRACE("iface %p.\n", iface);
return DDERR_UNSUPPORTED;
}
......@@ -210,8 +207,7 @@ IDirect3DMaterialImpl_Reserve(IDirect3DMaterial *iface)
static HRESULT WINAPI
IDirect3DMaterialImpl_Unreserve(IDirect3DMaterial *iface)
{
IDirect3DMaterialImpl *This = material_from_material1(iface);
TRACE("(%p)->() not implemented.\n", This);
TRACE("iface %p.\n", iface);
return DDERR_UNSUPPORTED;
}
......@@ -234,8 +230,9 @@ IDirect3DMaterialImpl_SetMaterial(IDirect3DMaterial3 *iface,
D3DMATERIAL *lpMat)
{
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
TRACE("(%p)->(%p)\n", This, lpMat);
if (TRACE_ON(d3d7))
TRACE("iface %p, material %p.\n", iface, lpMat);
if (TRACE_ON(ddraw))
dump_material(lpMat);
/* Stores the material */
......@@ -266,8 +263,10 @@ IDirect3DMaterialImpl_GetMaterial(IDirect3DMaterial3 *iface,
{
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
DWORD dwSize;
TRACE("(%p)->(%p)\n", This, lpMat);
if (TRACE_ON(d3d7)) {
TRACE("iface %p, material %p.\n", iface, lpMat);
if (TRACE_ON(ddraw))
{
TRACE(" Returning material : ");
dump_material(&This->mat);
}
......@@ -303,7 +302,8 @@ IDirect3DMaterialImpl_GetHandle(IDirect3DMaterial3 *iface,
{
IDirect3DMaterialImpl *This = (IDirect3DMaterialImpl *)iface;
IDirect3DDeviceImpl *device = device_from_device3(lpDirect3DDevice3);
TRACE("(%p/%p)->(%p,%p)\n", This, iface, device, lpHandle);
TRACE("iface %p, device %p, handle %p.\n", iface, lpDirect3DDevice3, lpHandle);
EnterCriticalSection(&ddraw_cs);
This->active_device = device;
......@@ -331,7 +331,8 @@ Thunk_IDirect3DMaterialImpl_2_GetHandle(LPDIRECT3DMATERIAL2 iface,
LPDIRECT3DDEVICE2 lpDirect3DDevice2,
LPD3DMATERIALHANDLE lpHandle)
{
TRACE_(ddraw_thunk)("(%p)->(%p,%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpDirect3DDevice2, lpHandle);
TRACE("iface %p, device %p, handle %p.\n", iface, lpDirect3DDevice2, lpHandle);
return IDirect3DMaterial3_GetHandle((IDirect3DMaterial3 *)material_from_material2(iface), lpDirect3DDevice2 ?
(IDirect3DDevice3 *)&device_from_device2(lpDirect3DDevice2)->IDirect3DDevice3_vtbl : NULL, lpHandle);
}
......@@ -341,7 +342,8 @@ Thunk_IDirect3DMaterialImpl_1_GetHandle(LPDIRECT3DMATERIAL iface,
LPDIRECT3DDEVICE lpDirect3DDevice,
LPD3DMATERIALHANDLE lpHandle)
{
TRACE_(ddraw_thunk)("(%p)->(%p,%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpDirect3DDevice, lpHandle);
TRACE("iface %p, device %p, handle %p.\n", iface, lpDirect3DDevice, lpHandle);
return IDirect3DMaterial3_GetHandle((IDirect3DMaterial3 *)material_from_material1(iface), lpDirect3DDevice ?
(IDirect3DDevice3 *)&device_from_device1(lpDirect3DDevice)->IDirect3DDevice3_vtbl : NULL, lpHandle);
}
......@@ -351,7 +353,8 @@ Thunk_IDirect3DMaterialImpl_2_QueryInterface(LPDIRECT3DMATERIAL2 iface,
REFIID riid,
LPVOID* obp)
{
TRACE_(ddraw_thunk)("(%p)->(%s,%p) thunking to IDirect3DMaterial3 interface.\n", iface, debugstr_guid(riid), obp);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp);
return IDirect3DMaterial3_QueryInterface((IDirect3DMaterial3 *)material_from_material2(iface), riid, obp);
}
......@@ -360,35 +363,40 @@ Thunk_IDirect3DMaterialImpl_1_QueryInterface(LPDIRECT3DMATERIAL iface,
REFIID riid,
LPVOID* obp)
{
TRACE_(ddraw_thunk)("(%p)->(%s,%p) thunking to IDirect3DMaterial3 interface.\n", iface, debugstr_guid(riid), obp);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp);
return IDirect3DMaterial3_QueryInterface((IDirect3DMaterial3 *)material_from_material1(iface), riid, obp);
}
static ULONG WINAPI
Thunk_IDirect3DMaterialImpl_2_AddRef(LPDIRECT3DMATERIAL2 iface)
{
TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DMaterial3 interface.\n", iface);
TRACE("iface %p.\n", iface);
return IDirect3DMaterial3_AddRef((IDirect3DMaterial3 *)material_from_material2(iface));
}
static ULONG WINAPI
Thunk_IDirect3DMaterialImpl_1_AddRef(LPDIRECT3DMATERIAL iface)
{
TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DMaterial3 interface.\n", iface);
TRACE("iface %p.\n", iface);
return IDirect3DMaterial3_AddRef((IDirect3DMaterial3 *)material_from_material1(iface));
}
static ULONG WINAPI
Thunk_IDirect3DMaterialImpl_2_Release(LPDIRECT3DMATERIAL2 iface)
{
TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DMaterial3 interface.\n", iface);
TRACE("iface %p.\n", iface);
return IDirect3DMaterial3_Release((IDirect3DMaterial3 *)material_from_material2(iface));
}
static ULONG WINAPI
Thunk_IDirect3DMaterialImpl_1_Release(LPDIRECT3DMATERIAL iface)
{
TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DMaterial3 interface.\n", iface);
TRACE("iface %p.\n", iface);
return IDirect3DMaterial3_Release((IDirect3DMaterial3 *)material_from_material1(iface));
}
......@@ -396,7 +404,8 @@ static HRESULT WINAPI
Thunk_IDirect3DMaterialImpl_2_SetMaterial(LPDIRECT3DMATERIAL2 iface,
LPD3DMATERIAL lpMat)
{
TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpMat);
TRACE("iface %p, material %p.\n", iface, lpMat);
return IDirect3DMaterial3_SetMaterial((IDirect3DMaterial3 *)material_from_material2(iface), lpMat);
}
......@@ -404,7 +413,8 @@ static HRESULT WINAPI
Thunk_IDirect3DMaterialImpl_1_SetMaterial(LPDIRECT3DMATERIAL iface,
LPD3DMATERIAL lpMat)
{
TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpMat);
TRACE("iface %p, material %p.\n", iface, lpMat);
return IDirect3DMaterial3_SetMaterial((IDirect3DMaterial3 *)material_from_material1(iface), lpMat);
}
......@@ -412,7 +422,8 @@ static HRESULT WINAPI
Thunk_IDirect3DMaterialImpl_2_GetMaterial(LPDIRECT3DMATERIAL2 iface,
LPD3DMATERIAL lpMat)
{
TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpMat);
TRACE("iface %p, material %p.\n", iface, lpMat);
return IDirect3DMaterial3_GetMaterial((IDirect3DMaterial3 *)material_from_material2(iface), lpMat);
}
......@@ -420,7 +431,8 @@ static HRESULT WINAPI
Thunk_IDirect3DMaterialImpl_1_GetMaterial(LPDIRECT3DMATERIAL iface,
LPD3DMATERIAL lpMat)
{
TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DMaterial3 interface.\n", iface, lpMat);
TRACE("iface %p, material %p.\n", iface, lpMat);
return IDirect3DMaterial3_GetMaterial((IDirect3DMaterial3 *)material_from_material1(iface), lpMat);
}
......
......@@ -43,8 +43,7 @@ IDirectDrawPaletteImpl_QueryInterface(IDirectDrawPalette *iface,
REFIID refiid,
void **obj)
{
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(refiid),obj);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(refiid), obj);
if (IsEqualGUID(refiid, &IID_IUnknown)
|| IsEqualGUID(refiid, &IID_IDirectDrawPalette))
......@@ -75,7 +74,7 @@ IDirectDrawPaletteImpl_AddRef(IDirectDrawPalette *iface)
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -95,7 +94,7 @@ IDirectDrawPaletteImpl_Release(IDirectDrawPalette *iface)
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (ref == 0)
{
......@@ -133,7 +132,9 @@ IDirectDrawPaletteImpl_Initialize(IDirectDrawPalette *iface,
DWORD Flags,
PALETTEENTRY *ColorTable)
{
TRACE("(%p)->(%p,%x,%p)\n", iface, DD, Flags, ColorTable);
TRACE("iface %p, ddraw %p, flags %#x, entries %p.\n",
iface, DD, Flags, ColorTable);
return DDERR_ALREADYINITIALIZED;
}
......@@ -157,7 +158,8 @@ IDirectDrawPaletteImpl_GetCaps(IDirectDrawPalette *iface,
{
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%p): Relay\n", This, Caps);
TRACE("iface %p, caps %p.\n", iface, Caps);
EnterCriticalSection(&ddraw_cs);
hr = IWineD3DPalette_GetCaps(This->wineD3DPalette, Caps);
......@@ -192,7 +194,9 @@ IDirectDrawPaletteImpl_SetEntries(IDirectDrawPalette *iface,
{
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%x,%d,%d,%p): Relay\n", This, Flags, Start, Count, PalEnt);
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n",
iface, Flags, Start, Count, PalEnt);
if(!PalEnt)
return DDERR_INVALIDPARAMS;
......@@ -229,7 +233,9 @@ IDirectDrawPaletteImpl_GetEntries(IDirectDrawPalette *iface,
{
IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface;
HRESULT hr;
TRACE("(%p)->(%x,%d,%d,%p): Relay\n", This, Flags, Start, Count, PalEnt);
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n",
iface, Flags, Start, Count, PalEnt);
if(!PalEnt)
return DDERR_INVALIDPARAMS;
......
......@@ -51,7 +51,7 @@ IParentImpl_QueryInterface(IParent *iface,
REFIID riid,
void **obj)
{
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), obj);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj);
*obj = NULL;
if ( IsEqualGUID( &IID_IUnknown, riid ) ||
......@@ -81,7 +81,7 @@ IParentImpl_AddRef(IParent *iface)
IParentImpl *This = (IParentImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) : AddRef from %d\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -105,7 +105,7 @@ static ULONG WINAPI IParentImpl_Release(IParent *iface)
IParentImpl *This = (IParentImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) : ReleaseRef to %d\n", This, ref);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (ref == 0)
{
......
......@@ -24,7 +24,7 @@
#include "ddraw_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d7);
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
/*****************************************************************************
* Helper functions
......@@ -131,7 +131,7 @@ IDirect3DViewportImpl_QueryInterface(IDirect3DViewport3 *iface,
REFIID riid,
void **obp)
{
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), obp);
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp);
*obp = NULL;
......@@ -163,7 +163,7 @@ IDirect3DViewportImpl_AddRef(IDirect3DViewport3 *iface)
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() incrementing from %u.\n", This, ref - 1);
TRACE("%p increasing refcount to %u.\n", This, ref);
return ref;
}
......@@ -183,7 +183,7 @@ IDirect3DViewportImpl_Release(IDirect3DViewport3 *iface)
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
TRACE("%p decreasing refcount to %u.\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
......@@ -212,7 +212,8 @@ static HRESULT WINAPI
IDirect3DViewportImpl_Initialize(IDirect3DViewport3 *iface,
IDirect3D *Direct3D)
{
TRACE("(%p)->(%p) no-op...\n", iface, Direct3D);
TRACE("iface %p, d3d %p.\n", iface, Direct3D);
return DDERR_ALREADYINITIALIZED;
}
......@@ -235,7 +236,8 @@ IDirect3DViewportImpl_GetViewport(IDirect3DViewport3 *iface,
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
DWORD dwSize;
TRACE("(%p/%p)->(%p)\n", This, iface, lpData);
TRACE("iface %p, data %p.\n", iface, lpData);
EnterCriticalSection(&ddraw_cs);
dwSize = lpData->dwSize;
......@@ -258,7 +260,8 @@ IDirect3DViewportImpl_GetViewport(IDirect3DViewport3 *iface,
memcpy(lpData, &vp1, dwSize);
}
if (TRACE_ON(d3d7)) {
if (TRACE_ON(ddraw))
{
TRACE(" returning D3DVIEWPORT :\n");
_dump_D3DVIEWPORT(lpData);
}
......@@ -286,9 +289,11 @@ IDirect3DViewportImpl_SetViewport(IDirect3DViewport3 *iface,
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
LPDIRECT3DVIEWPORT3 current_viewport;
TRACE("(%p/%p)->(%p)\n", This, iface, lpData);
if (TRACE_ON(d3d7)) {
TRACE("iface %p, data %p.\n", iface, lpData);
if (TRACE_ON(ddraw))
{
TRACE(" getting D3DVIEWPORT :\n");
_dump_D3DVIEWPORT(lpData);
}
......@@ -360,7 +365,9 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
unsigned int i;
D3DVIEWPORT vp = This->viewports.vp1;
D3DHVERTEX *outH;
TRACE("(%p)->(%08x,%p,%08x,%p)\n", This, dwVertexCount, lpData, dwFlags, lpOffScreen);
TRACE("iface %p, vertex_count %u, vertex_data %p, flags %#x, clip_plane %p.\n",
iface, dwVertexCount, lpData, dwFlags, lpOffScreen);
/* Tests on windows show that Windows crashes when this occurs,
* so don't return the (intuitive) return value
......@@ -491,8 +498,8 @@ IDirect3DViewportImpl_LightElements(IDirect3DViewport3 *iface,
DWORD dwElementCount,
LPD3DLIGHTDATA lpData)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
TRACE("(%p)->(%08x,%p): Unimplemented!\n", This, dwElementCount, lpData);
TRACE("iface %p, element_count %u, data %p.\n", iface, dwElementCount, lpData);
return DDERR_UNSUPPORTED;
}
......@@ -515,7 +522,7 @@ IDirect3DViewportImpl_SetBackground(IDirect3DViewport3 *iface,
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
IDirect3DMaterialImpl *m;
TRACE("(%p)->(%d)\n", This, hMat);
TRACE("iface %p, material %#x.\n", iface, hMat);
EnterCriticalSection(&ddraw_cs);
......@@ -563,7 +570,8 @@ IDirect3DViewportImpl_GetBackground(IDirect3DViewport3 *iface,
BOOL *lpValid)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
TRACE("(%p)->(%p,%p)\n", This, lphMat, lpValid);
TRACE("iface %p, material %p, valid %p.\n", iface, lphMat, lpValid);
EnterCriticalSection(&ddraw_cs);
if(lpValid)
......@@ -602,8 +610,8 @@ static HRESULT WINAPI
IDirect3DViewportImpl_SetBackgroundDepth(IDirect3DViewport3 *iface,
IDirectDrawSurface *lpDDSurface)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
FIXME("(%p)->(%p): stub!\n", This, lpDDSurface);
FIXME("iface %p, surface %p stub!\n", iface, lpDDSurface);
return D3D_OK;
}
......@@ -626,8 +634,8 @@ IDirect3DViewportImpl_GetBackgroundDepth(IDirect3DViewport3 *iface,
IDirectDrawSurface **lplpDDSurface,
LPBOOL lpValid)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
FIXME("(%p)->(%p,%p): stub!\n", This, lplpDDSurface, lpValid);
FIXME("iface %p, surface %p, valid %p stub!\n", iface, lplpDDSurface, lpValid);
return DD_OK;
}
......@@ -657,7 +665,8 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
LPDIRECT3DVIEWPORT3 current_viewport;
IDirect3DDevice3 *d3d_device3;
TRACE("(%p/%p)->(%08x,%p,%08x)\n", This, iface, dwCount, lpRects, dwFlags);
TRACE("iface %p, rect_count %u, rects %p, flags %#x.\n", iface, dwCount, lpRects, dwFlags);
if (This->active_device == NULL) {
ERR(" Trying to clear a viewport not attached to a device !\n");
return D3DERR_VIEWPORTHASNODEVICE;
......@@ -719,7 +728,7 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface,
DWORD i = 0;
DWORD map = This->map_lights;
TRACE("(%p)->(%p)\n", This, lpDirect3DLight);
TRACE("iface %p, light %p.\n", iface, lpDirect3DLight);
EnterCriticalSection(&ddraw_cs);
if (This->num_lights >= 8)
......@@ -774,7 +783,7 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface,
IDirect3DLightImpl *lpDirect3DLightImpl = (IDirect3DLightImpl *)lpDirect3DLight;
IDirect3DLightImpl *cur_light, *prev_light = NULL;
TRACE("(%p)->(%p)\n", This, lpDirect3DLight);
TRACE("iface %p, light %p.\n", iface, lpDirect3DLight);
EnterCriticalSection(&ddraw_cs);
cur_light = This->lights;
......@@ -822,7 +831,8 @@ IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface,
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
IDirect3DLightImpl *cur_light, *prev_light = NULL;
TRACE("(%p)->(%p,%p,%08x)\n", This, lpDirect3DLight, lplpDirect3DLight, dwFlags);
TRACE("iface %p, light %p, next_light %p, flags %#x.\n",
iface, lpDirect3DLight, lplpDirect3DLight, dwFlags);
if (!lplpDirect3DLight)
return DDERR_INVALIDPARAMS;
......@@ -896,7 +906,8 @@ IDirect3DViewportImpl_GetViewport2(IDirect3DViewport3 *iface,
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
DWORD dwSize;
TRACE("(%p)->(%p)\n", This, lpData);
TRACE("iface %p, data %p.\n", iface, lpData);
EnterCriticalSection(&ddraw_cs);
dwSize = lpData->dwSize;
......@@ -919,7 +930,8 @@ IDirect3DViewportImpl_GetViewport2(IDirect3DViewport3 *iface,
memcpy(lpData, &vp2, dwSize);
}
if (TRACE_ON(d3d7)) {
if (TRACE_ON(ddraw))
{
TRACE(" returning D3DVIEWPORT2 :\n");
_dump_D3DVIEWPORT2(lpData);
}
......@@ -946,9 +958,11 @@ IDirect3DViewportImpl_SetViewport2(IDirect3DViewport3 *iface,
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
LPDIRECT3DVIEWPORT3 current_viewport;
TRACE("(%p/%p)->(%p)\n", This, iface, lpData);
if (TRACE_ON(d3d7)) {
TRACE("iface %p, data %p.\n", iface, lpData);
if (TRACE_ON(ddraw))
{
TRACE(" getting D3DVIEWPORT2 :\n");
_dump_D3DVIEWPORT2(lpData);
}
......@@ -992,8 +1006,8 @@ static HRESULT WINAPI
IDirect3DViewportImpl_SetBackgroundDepth2(IDirect3DViewport3 *iface,
IDirectDrawSurface4 *lpDDS)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
FIXME("(%p)->(%p): stub!\n", This, lpDDS);
FIXME("iface %p, surface %p stub!\n", iface, lpDDS);
return D3D_OK;
}
......@@ -1015,8 +1029,8 @@ IDirect3DViewportImpl_GetBackgroundDepth2(IDirect3DViewport3 *iface,
IDirectDrawSurface4 **lplpDDS,
BOOL *lpValid)
{
IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface;
FIXME("(%p/%p)->(%p,%p): stub!\n", This, iface, lplpDDS, lpValid);
FIXME("iface %p, surface %p, valid %p stub!\n", iface, lplpDDS, lpValid);
return D3D_OK;
}
......@@ -1049,7 +1063,9 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
HRESULT hr;
LPDIRECT3DVIEWPORT3 current_viewport;
IDirect3DDevice3 *d3d_device3;
TRACE("(%p)->(%08x,%p,%08x,%08x,%f,%08x)\n", This, dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, depth %.8e, stencil %u.\n",
iface, dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
EnterCriticalSection(&ddraw_cs);
if (This->active_device == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment