DXGL r519 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r518‎ | r519 | r520 >
Date:23:38, 6 September 2014
Author:admin
Status:new
Tags:
Comment:
Trace log fixes. Material refcount fix.
Modified paths:
  • /ddraw/glDirect3DMaterial.cpp (modified) (history)
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)
  • /ddraw/trace.c (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DMaterial.cpp
@@ -73,7 +73,7 @@
7474 }
7575 if(riid == IID_IDirect3DMaterial2)
7676 {
77 - this - AddRef();
 77+ this->AddRef();
7878 *ppvObj = glD3DM2;
7979 TRACE_VAR("*ppvObj",14,*ppvObj);
8080 TRACE_EXIT(23,D3D_OK);
@@ -81,7 +81,7 @@
8282 }
8383 if(riid == IID_IDirect3DMaterial)
8484 {
85 - this - AddRef();
 85+ this->AddRef();
8686 *ppvObj = glD3DM1;
8787 TRACE_VAR("*ppvObj", 14, *ppvObj);
8888 TRACE_EXIT(23, D3D_OK);
@@ -102,6 +102,7 @@
103103
104104 ULONG WINAPI glDirect3DMaterial3::Release()
105105 {
 106+ TRACE_ENTER(1, 14, this);
106107 if(!this) TRACE_RET(ULONG,8,0);
107108 ULONG ret;
108109 refcount--;
Index: ddraw/glDirectDrawSurface.cpp
@@ -683,7 +683,7 @@
684684
685685 HRESULT WINAPI glDirectDrawSurface7::AddAttachedSurface(LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface)
686686 {
687 - TRACE_ENTER(2, 14, this, 15, lpDDSAttachedSurface);
 687+ TRACE_ENTER(2, 14, this, 14, lpDDSAttachedSurface);
688688 if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
689689 if (!lpDDSAttachedSurface) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
690690 LPDIRECTDRAWSURFACE7 dds7;
@@ -1703,7 +1703,7 @@
17041704 device = glD3DDev7;
17051705 handle = device->AddTexture(this);
17061706 if(handle == -1) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
1707 - device->AddRef();
 1707+ //device->AddRef();
17081708 *lpHandle = handle;
17091709 TRACE_VAR("*lpHandle",9,*lpHandle);
17101710 TRACE_EXIT(23,D3D_OK);
@@ -1757,7 +1757,7 @@
17581758 }
17591759 HRESULT WINAPI glDirectDrawSurface1::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
17601760 {
1761 - TRACE_ENTER(2, 14, this, 15, lpDDSAttachedSurface);
 1761+ TRACE_ENTER(2, 14, this, 14, lpDDSAttachedSurface);
17621762 if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
17631763 if (!lpDDSAttachedSurface) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
17641764 LPDIRECTDRAWSURFACE7 dds7;
@@ -2062,7 +2062,7 @@
20632063 }
20642064 HRESULT WINAPI glDirectDrawSurface2::AddAttachedSurface(LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
20652065 {
2066 - TRACE_ENTER(2, 14, this, 15, lpDDSAttachedSurface);
 2066+ TRACE_ENTER(2, 14, this, 14, lpDDSAttachedSurface);
20672067 if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
20682068 if (!lpDDSAttachedSurface) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
20692069 LPDIRECTDRAWSURFACE7 dds7;
@@ -2391,7 +2391,7 @@
23922392 }
23932393 HRESULT WINAPI glDirectDrawSurface3::AddAttachedSurface(LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
23942394 {
2395 - TRACE_ENTER(2, 14, this, 15, lpDDSAttachedSurface);
 2395+ TRACE_ENTER(2, 14, this, 14, lpDDSAttachedSurface);
23962396 if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
23972397 if (!lpDDSAttachedSurface) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
23982398 LPDIRECTDRAWSURFACE7 dds7;
@@ -2727,7 +2727,7 @@
27282728 }
27292729 HRESULT WINAPI glDirectDrawSurface4::AddAttachedSurface(LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface)
27302730 {
2731 - TRACE_ENTER(2, 14, this, 15, lpDDSAttachedSurface);
 2731+ TRACE_ENTER(2, 14, this, 14, lpDDSAttachedSurface);
27322732 if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
27332733 if (!lpDDSAttachedSurface) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
27342734 LPDIRECTDRAWSURFACE7 dds7;
Index: ddraw/trace.c
@@ -947,7 +947,7 @@
948948 if(!arg) WriteFile(outfile,"NULL",4,&byteswritten,NULL);
949949 else
950950 {
951 - WriteFile(outfile,"L\"",1,&byteswritten,NULL);
 951+ WriteFile(outfile,"L\"",2,&byteswritten,NULL);
952952 buffersize = WideCharToMultiByte(CP_UTF8,0,(wchar_t*)arg,-1,NULL,0,NULL,NULL);
953953 mbcsbuffer = (char*)malloc(buffersize);
954954 if(!mbcsbuffer) WriteFile(outfile,"OUT OF MEMORY",13,&byteswritten,NULL);