DXGL r368 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r367
|
r368
|
r369
>
Date:
22:50, 20 April 2013
Author:
admin
Status:
new
Tags:
Comment:
Remove dependency on DDraw objects in IDirect3D objects - not needed.
Modified paths:
/ddraw/glDirect3D.cpp
(modified) (
history
)
/ddraw/glDirect3D.h
(modified) (
history
)
/ddraw/glDirectDraw.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirect3D.cpp
—
—
@@ -193,12 +193,10 @@
194
194
"DXGL D3D T&L HAL",
195
195
}
196
196
};
197
-glDirect3D7::glDirect3D7(glDirectDraw7 *glDD7)
197
+glDirect3D7::glDirect3D7()
198
198
{
199
- TRACE_ENTER(2,14,this,14,glDD7);
199
+ TRACE_ENTER(1,14,this);
200
200
refcount=1;
201
- this->glDD7 = glDD7;
202
- glDD7->AddRef();
203
201
glD3D3 = NULL;
204
202
glD3D2 = NULL;
205
203
glD3D1 = NULL;
—
—
@@ -210,7 +208,7 @@
211
209
TRACE_ENTER(1,14,this);
212
210
if(glD3D3) glD3D3->Release();
213
211
if(glD3D2) glD3D2->Release();
214
- glDD7->Release();
212
+ if(glD3D1) glD3D1->Release();
215
213
TRACE_EXIT(-1,0);
216
214
}
217
215
Index: ddraw/glDirect3D.h
—
—
@@ -29,7 +29,7 @@
30
30
class glDirect3D7 : public IDirect3D7
31
31
{
32
32
public:
33
- glDirect3D7(glDirectDraw7 *glDD7);
33
+ glDirect3D7();
34
34
virtual ~glDirect3D7();
35
35
HRESULT WINAPI QueryInterface(REFIID riid, void** ppvObj);
36
36
ULONG WINAPI AddRef();
—
—
@@ -44,7 +44,6 @@
45
45
HRESULT WINAPI EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext);
46
46
HRESULT WINAPI EvictManagedTextures();
47
47
HRESULT WINAPI FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR);
48
- glDirectDraw7 *glDD7;
49
48
glDirect3D3 *glD3D3;
50
49
glDirect3D2 *glD3D2;
51
50
glDirect3D1 *glD3D1;
Index: ddraw/glDirectDraw.cpp
—
—
@@ -697,7 +697,7 @@
698
698
}
699
699
if(riid == IID_IDirect3D)
700
700
{
701
- glDirect3D7 *tmp = new glDirect3D7(this);
701
+ glDirect3D7 *tmp = new glDirect3D7;
702
702
tmp->QueryInterface(IID_IDirect3D,ppvObj);
703
703
tmp->Release();
704
704
TRACE_VAR("*ppvObj",14,*ppvObj);
—
—
@@ -706,7 +706,7 @@
707
707
}
708
708
if(riid == IID_IDirect3D2)
709
709
{
710
- glDirect3D7 *tmp = new glDirect3D7(this);
710
+ glDirect3D7 *tmp = new glDirect3D7;
711
711
tmp->QueryInterface(IID_IDirect3D2,ppvObj);
712
712
tmp->Release();
713
713
TRACE_VAR("*ppvObj",14,*ppvObj);
—
—
@@ -715,7 +715,7 @@
716
716
}
717
717
if(riid == IID_IDirect3D3)
718
718
{
719
- glDirect3D7 *tmp = new glDirect3D7(this);
719
+ glDirect3D7 *tmp = new glDirect3D7;
720
720
tmp->QueryInterface(IID_IDirect3D3,ppvObj);
721
721
tmp->Release();
722
722
TRACE_VAR("*ppvObj",14,*ppvObj);
—
—
@@ -724,7 +724,7 @@
725
725
}
726
726
if(riid == IID_IDirect3D7)
727
727
{
728
- *ppvObj = new glDirect3D7(this);
728
+ *ppvObj = new glDirect3D7;
729
729
TRACE_VAR("*ppvObj",14,*ppvObj);
730
730
TRACE_EXIT(23,DD_OK);
731
731
return DD_OK;
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version