Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b994d057
Commit
b994d057
authored
Feb 07, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Feb 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d/d3d9: Cleanup GetContainer for volumes.
parent
2200f3e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
+41
-11
volume.c
dlls/d3d9/volume.c
+27
-7
volume.c
dlls/wined3d/volume.c
+14
-4
No files found.
dlls/d3d9/volume.c
View file @
b994d057
...
...
@@ -92,18 +92,38 @@ HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(LPDIRECT3DVOLUME9 iface, REF
HRESULT
WINAPI
IDirect3DVolume9Impl_GetContainer
(
LPDIRECT3DVOLUME9
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DVolume9Impl
*
This
=
(
IDirect3DVolume9Impl
*
)
iface
;
IWineD3DBase
*
wineD3DContainer
=
NULL
;
IUnknown
*
wineD3DContainerParent
=
NULL
;
HRESULT
res
;
IUnknown
*
IWineContainer
=
NULL
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
res
=
IWineD3DVolume_GetContainer
(
This
->
wineD3DVolume
,
riid
,
(
void
**
)
&
IWineContainer
);
TRACE
(
"(This %p, riid %s, ppContainer %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppContainer
);
/* If this works, the only valid container is a child of resource (volumetexture) */
if
(
res
==
D3D_OK
&&
NULL
!=
ppContainer
)
{
IWineD3DResource_GetParent
((
IWineD3DResource
*
)
IWineContainer
,
(
IUnknown
**
)
ppContainer
);
IWineD3DResource_Release
((
IWineD3DResource
*
)
IWineContainer
);
if
(
!
ppContainer
)
{
ERR
(
"Called without a valid ppContainer.
\n
"
);
}
/* Get the WineD3D container. */
res
=
IWineD3DVolume_GetContainer
(
This
->
wineD3DVolume
,
&
IID_IWineD3DBase
,
(
void
**
)
&
wineD3DContainer
);
if
(
res
!=
D3D_OK
)
return
res
;
if
(
!
wineD3DContainer
)
{
ERR
(
"IWineD3DSurface_GetContainer should never return NULL
\n
"
);
}
/* Get the parent */
IWineD3DBase_GetParent
(
wineD3DContainer
,
&
wineD3DContainerParent
);
IUnknown_Release
(
wineD3DContainer
);
if
(
!
wineD3DContainerParent
)
{
ERR
(
"IWineD3DBase_GetParent should never return NULL
\n
"
);
}
/* Now, query the interface of the parent for the riid */
res
=
IUnknown_QueryInterface
(
wineD3DContainerParent
,
riid
,
ppContainer
);
IUnknown_Release
(
wineD3DContainerParent
);
TRACE
(
"Returning ppContainer %p, *ppContainer %p
\n
"
,
ppContainer
,
*
ppContainer
);
return
res
;
}
...
...
dlls/wined3d/volume.c
View file @
b994d057
...
...
@@ -105,10 +105,20 @@ D3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) {
******************************************* */
HRESULT
WINAPI
IWineD3DVolumeImpl_GetContainer
(
IWineD3DVolume
*
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IWineD3DVolumeImpl
*
This
=
(
IWineD3DVolumeImpl
*
)
iface
;
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
This
->
container
);
*
ppContainer
=
This
->
container
;
IUnknown_AddRef
(
This
->
container
);
return
D3D_OK
;
TRACE
(
"(This %p, riid %s, ppContainer %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppContainer
);
if
(
!
ppContainer
)
{
ERR
(
"Called without a valid ppContainer.
\n
"
);
}
/* Although surfaces can be standalone, volumes can't */
if
(
!
This
->
container
)
{
ERR
(
"Volume without an container. Should not happen.
\n
"
);
}
TRACE
(
"Relaying to QueryInterface
\n
"
);
return
IUnknown_QueryInterface
(
This
->
container
,
riid
,
ppContainer
);
}
HRESULT
WINAPI
IWineD3DVolumeImpl_GetDesc
(
IWineD3DVolume
*
iface
,
WINED3DVOLUME_DESC
*
pDesc
)
{
...
...
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