Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7f5dccb6
Commit
7f5dccb6
authored
Feb 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly release the converted vertex declaration.
parent
0feddccf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
d3d9_private.h
dlls/d3d9/d3d9_private.h
+5
-0
device.c
dlls/d3d9/device.c
+3
-0
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+5
-0
No files found.
dlls/d3d9/d3d9_private.h
View file @
7f5dccb6
...
...
@@ -179,6 +179,11 @@ typedef struct IDirect3DDevice9Impl
/* Avoids recursion with nested ReleaseRef to 0 */
BOOL
inDestruction
;
/* A vertex declaration was converted from setFVF.
* Keep track of it, so it can be properly freed
*/
IDirect3DVertexDeclaration9
*
convertedDecl
;
}
IDirect3DDevice9Impl
;
...
...
dlls/d3d9/device.c
View file @
7f5dccb6
...
...
@@ -62,6 +62,8 @@ static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface) {
if
(
ref
==
0
)
{
This
->
inDestruction
=
TRUE
;
if
(
This
->
convertedDecl
!=
NULL
)
IUnknown_Release
(
This
->
convertedDecl
);
IWineD3DDevice_Uninit3D
(
This
->
WineD3DDevice
,
D3D9CB_DestroyDepthStencilSurface
,
D3D9CB_DestroySwapChain
);
IWineD3DDevice_Release
(
This
->
WineD3DDevice
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -766,6 +768,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF)
hr
=
IDirect3DDevice9Impl_SetVertexDeclaration
(
iface
,
pDecl
);
if
(
hr
!=
S_OK
)
goto
exit
;
This
->
convertedDecl
=
pDecl
;
pDecl
=
NULL
;
exit:
...
...
dlls/d3d9/vertexdeclaration.c
View file @
7f5dccb6
...
...
@@ -360,6 +360,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 ifa
TRACE
(
"(%p) : Relay
\n
"
,
iface
);
if
(
This
->
convertedDecl
&&
This
->
convertedDecl
!=
pDecl
)
{
IUnknown_Release
(
This
->
convertedDecl
);
This
->
convertedDecl
=
NULL
;
}
hr
=
IWineD3DDevice_SetVertexDeclaration
(
This
->
WineD3DDevice
,
pDeclImpl
==
NULL
?
NULL
:
pDeclImpl
->
wineD3DVertexDeclaration
);
return
hr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment