DXGL r48 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r47‎ | r48 | r49 >
Date:20:33, 25 December 2011
Author:admin
Status:new
Tags:
Comment:
Fix COM initialization.
Load settings when initialized via COM.
Modified paths:
  • /ddraw/ddraw.cpp (modified) (history)
  • /ddraw/glClassFactory.cpp (modified) (history)

Diff [purge]

Index: ddraw/ddraw.cpp
@@ -237,6 +237,7 @@
238238 {
239239 if((rclsid != CLSID_DirectDraw) && (rclsid != CLSID_DirectDraw7) &&
240240 (rclsid != CLSID_DirectDrawClipper)) return CLASS_E_CLASSNOTAVAILABLE;
 241+ GetCurrentConfig(&dxglcfg);
241242 glClassFactory *factory = new glClassFactory;
242243 if(factory == NULL) return E_OUTOFMEMORY;
243244 HRESULT result = factory->QueryInterface(riid,ppv);
Index: ddraw/glClassFactory.cpp
@@ -41,6 +41,7 @@
4242 if((riid == IID_IUnknown) || (riid == IID_IClassFactory))
4343 {
4444 *ppvObj = this;
 45+ this->AddRef();
4546 }
4647 else
4748 {