Skip to content

Commit

Permalink
Fix COM initialization.
Browse files Browse the repository at this point in the history
Load settings when initialized via COM.

git-svn-id: https://www.williamfeely.info/svn/dxgl@48 8a90861a-4eca-46d5-b744-240ff16d0c4d
  • Loading branch information
dxgldotorg committed Dec 25, 2011
1 parent 297eea9 commit a7abe45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ddraw/ddraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if((rclsid != CLSID_DirectDraw) && (rclsid != CLSID_DirectDraw7) &&
(rclsid != CLSID_DirectDrawClipper)) return CLASS_E_CLASSNOTAVAILABLE;
GetCurrentConfig(&dxglcfg);
glClassFactory *factory = new glClassFactory;
if(factory == NULL) return E_OUTOFMEMORY;
HRESULT result = factory->QueryInterface(riid,ppv);
Expand Down
1 change: 1 addition & 0 deletions ddraw/glClassFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ HRESULT WINAPI glClassFactory::QueryInterface(REFIID riid, void** ppvObj)
if((riid == IID_IUnknown) || (riid == IID_IClassFactory))
{
*ppvObj = this;
this->AddRef();
}
else
{
Expand Down

0 comments on commit a7abe45

Please sign in to comment.