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
05b6032f
Commit
05b6032f
authored
Jan 31, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: COM cleanup for the IDirect3DVolume8 iface.
parent
c8a953c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
32 deletions
+50
-32
d3d8_private.h
dlls/d3d8/d3d8_private.h
+5
-6
device.c
dlls/d3d8/device.c
+1
-1
volume.c
dlls/d3d8/volume.c
+44
-25
No files found.
dlls/d3d8/d3d8_private.h
View file @
05b6032f
...
...
@@ -204,18 +204,17 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte
*/
struct
IDirect3DVolume8Impl
{
/* IUnknown fields */
const
IDirect3DVolume8Vtbl
*
lpVtbl
;
LONG
ref
;
IDirect3DVolume8
IDirect3DVolume8_iface
;
LONG
ref
;
/* IDirect3DVolume8 fields */
IWineD3DVolume
*
wineD3DVolume
;
IWineD3DVolume
*
wineD3DVolume
;
/* The volume container */
IUnknown
*
container
;
IUnknown
*
container
;
/* If set forward refcounting to this object */
IUnknown
*
forwardReference
;
IUnknown
*
forwardReference
;
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
...
...
dlls/d3d8/device.c
View file @
05b6032f
...
...
@@ -2873,7 +2873,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
*
volume
=
object
->
wineD3DVolume
;
IWineD3DVolume_AddRef
(
*
volume
);
IDirect3DVolume8_Release
(
(
IDirect3DVolume8
*
)
object
);
IDirect3DVolume8_Release
(
&
object
->
IDirect3DVolume8_iface
);
object
->
container
=
superior
;
object
->
forwardReference
=
superior
;
...
...
dlls/d3d8/volume.c
View file @
05b6032f
...
...
@@ -23,9 +23,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
/* IDirect3DVolume8 IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DVolume8Impl_QueryInterface
(
LPDIRECT3DVOLUME8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
inline
IDirect3DVolume8Impl
*
impl_from_IDirect3DVolume8
(
IDirect3DVolume8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DVolume8Impl
,
IDirect3DVolume8_iface
);
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_QueryInterface
(
IDirect3DVolume8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -41,8 +47,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 ifac
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DVolume8Impl_AddRef
(
LPDIRECT3DVOLUME8
iface
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DVolume8Impl_AddRef
(
IDirect3DVolume8
*
iface
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -67,8 +74,9 @@ static ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface) {
}
}
static
ULONG
WINAPI
IDirect3DVolume8Impl_Release
(
LPDIRECT3DVOLUME8
iface
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DVolume8Impl_Release
(
IDirect3DVolume8
*
iface
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -93,10 +101,10 @@ static ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface) {
}
}
/* IDirect3DVolume8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetDevice
(
IDirect3DVolume8
*
iface
,
IDirect3DDevice8
**
device
)
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetDevice
(
IDirect3DVolume8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
)
;
IDirect3DResource8
*
resource
;
HRESULT
hr
;
...
...
@@ -114,8 +122,10 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(IDirect3DVolume8 *iface, ID
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_SetPrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_SetPrivateData
(
IDirect3DVolume8
*
iface
,
REFGUID
refguid
,
const
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
...
...
@@ -128,8 +138,10 @@ static HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(LPDIRECT3DVOLUME8 ifac
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetPrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetPrivateData
(
IDirect3DVolume8
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
...
...
@@ -142,8 +154,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetPrivateData(LPDIRECT3DVOLUME8 ifac
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_FreePrivateData
(
LPDIRECT3DVOLUME8
iface
,
REFGUID
refguid
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_FreePrivateData
(
IDirect3DVolume8
*
iface
,
REFGUID
refguid
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
refguid
));
...
...
@@ -155,8 +168,10 @@ static HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(LPDIRECT3DVOLUME8 ifa
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetContainer
(
LPDIRECT3DVOLUME8
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetContainer
(
IDirect3DVolume8
*
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
res
;
TRACE
(
"iface %p, riid %s, container %p.
\n
"
,
...
...
@@ -171,8 +186,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface,
return
res
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetDesc
(
LPDIRECT3DVOLUME8
iface
,
D3DVOLUME_DESC
*
pDesc
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_GetDesc
(
IDirect3DVolume8
*
iface
,
D3DVOLUME_DESC
*
pDesc
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
WINED3DVOLUME_DESC
wined3ddesc
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
pDesc
);
...
...
@@ -193,8 +209,10 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DV
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_LockBox
(
LPDIRECT3DVOLUME8
iface
,
D3DLOCKED_BOX
*
pLockedVolume
,
CONST
D3DBOX
*
pBox
,
DWORD
Flags
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_LockBox
(
IDirect3DVolume8
*
iface
,
D3DLOCKED_BOX
*
pLockedVolume
,
const
D3DBOX
*
pBox
,
DWORD
Flags
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, locked_box %p, box %p, flags %#x.
\n
"
,
...
...
@@ -208,8 +226,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface, D3DL
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DVolume8Impl_UnlockBox
(
LPDIRECT3DVOLUME8
iface
)
{
IDirect3DVolume8Impl
*
This
=
(
IDirect3DVolume8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DVolume8Impl_UnlockBox
(
IDirect3DVolume8
*
iface
)
{
IDirect3DVolume8Impl
*
This
=
impl_from_IDirect3DVolume8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -253,7 +272,7 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device,
{
HRESULT
hr
;
volume
->
lpVtbl
=
&
Direct3DVolume8_Vtbl
;
volume
->
IDirect3DVolume8_iface
.
lpVtbl
=
&
Direct3DVolume8_Vtbl
;
volume
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateVolume
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
,
...
...
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