diff options
author | Kissaki <kissaki@gmx.de> | 2013-04-21 06:11:56 +0400 |
---|---|---|
committer | Kissaki <kissaki@gmx.de> | 2013-06-05 00:37:40 +0400 |
commit | 46fc3ccfc1c05854eb243219cf7eae2cc65ac19c (patch) | |
tree | bdda06d2b03d2d3ee864cb39dc844fd1e65da377 /overlay | |
parent | bb47083b9fe36cd01f699b66a117e8d68024f85f (diff) |
Commenting, formatting. Remove obsolete/wrong comment.
Diffstat (limited to 'overlay')
-rw-r--r-- | overlay/d3d9.cpp | 8 | ||||
-rw-r--r-- | overlay/lib.cpp | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/overlay/d3d9.cpp b/overlay/d3d9.cpp index 3eb85f818..5f2303308 100644 --- a/overlay/d3d9.cpp +++ b/overlay/d3d9.cpp @@ -50,6 +50,7 @@ class DevState : public Pipe { LONG initRefCount; LONG refCount; + // Thread-specific threadcount LONG myRefCount; DWORD dwMyThread; @@ -427,8 +428,9 @@ static ULONG __stdcall myAddRef(IDirect3DDevice9 *idd) { if (ds) { if (ds->dwMyThread == GetCurrentThreadId()) { ds->myRefCount++; - } else + } else { ds->refCount++; + } return ds->refCount + ds->initRefCount; } AddRefType oAddRef = (AddRefType) hhAddRef.call; @@ -480,7 +482,7 @@ static ULONG __stdcall myRelease(IDirect3DDevice9 *idd) { if (ds->refCount >= 0) return ds->refCount + ds->initRefCount; - ods("D3D9: Final release. MyRefs = %d, Tot = %d", ds->myRefCount, ds->refCount); + ods("D3D9: Final release is following. MyRefs = %d, Tot = %d", ds->myRefCount, ds->refCount); DWORD dwOldThread = ds->dwMyThread; if (dwOldThread) @@ -491,7 +493,7 @@ static ULONG __stdcall myRelease(IDirect3DDevice9 *idd) { ds->dwMyThread = dwOldThread; - ods("D3D9: Final release, MyRefs = %d Tot = %d", ds->myRefCount, ds->refCount); + ods("D3D9: Final release. MyRefs = %d Tot = %d", ds->myRefCount, ds->refCount); devMap.erase(idd); delete ds; diff --git a/overlay/lib.cpp b/overlay/lib.cpp index fb323d277..d15a99b7a 100644 --- a/overlay/lib.cpp +++ b/overlay/lib.cpp @@ -660,7 +660,6 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID) { hhLoad.setup(reinterpret_cast<voidFunc>(LoadLibraryA), reinterpret_cast<voidFunc>(MyLoadLibrary)); hhLoadW.setup(reinterpret_cast<voidFunc>(LoadLibraryW), reinterpret_cast<voidFunc>(MyLoadLibraryW)); - // Hm. Don't check D3D9 as apparantly it's creation causes problems in some applications. checkD3D9Hook(true); checkDXGIHook(true); checkOpenGLHook(); |