DXGL r428 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r427‎ | r428 | r429 >
Date:18:56, 13 April 2014
Author:admin
Status:new
Tags:
Comment:
glClassFactory::LockServer lock count in-class.
Modified paths:
  • /ddraw/glClassFactory.cpp (modified) (history)

Diff [purge]

Index: ddraw/glClassFactory.cpp
@@ -22,8 +22,6 @@
2323 #include "glutil.h"
2424 #include "glDirectDrawClipper.h"
2525
26 -LONG locks;
27 -
2826 ULONG WINAPI glClassFactory::AddRef()
2927 {
3028 TRACE_ENTER(1,14,this);
@@ -118,8 +116,8 @@
119117 {
120118 TRACE_ENTER(2,14,this,22,fLock);
121119 if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
122 - if(fLock) InterlockedIncrement(&locks);
123 - else InterlockedDecrement(&locks);
 120+ if(fLock) InterlockedIncrement(&lockcount);
 121+ else InterlockedDecrement(&lockcount);
124122 TRACE_EXIT(23,S_OK);
125123 return S_OK;
126124 }