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
ff923245
Commit
ff923245
authored
Sep 16, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Add a separate function for volume initialization.
parent
8ffca99f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
d3d8_private.h
dlls/d3d8/d3d8_private.h
+3
-1
device.c
dlls/d3d8/device.c
+3
-7
volume.c
dlls/d3d8/volume.c
+20
-1
No files found.
dlls/d3d8/d3d8_private.h
View file @
ff923245
...
...
@@ -218,7 +218,6 @@ struct IDirect3DDevice8Impl
/*****************************************************************************
* IDirect3DVolume8 implementation structure
*/
extern
const
IDirect3DVolume8Vtbl
Direct3DVolume8_Vtbl
;
struct
IDirect3DVolume8Impl
{
/* IUnknown fields */
...
...
@@ -235,6 +234,9 @@ struct IDirect3DVolume8Impl
IUnknown
*
forwardReference
;
};
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
);
/* ------------------- */
/* IDirect3DSwapChain8 */
/* ------------------- */
...
...
dlls/d3d8/device.c
View file @
ff923245
...
...
@@ -2753,15 +2753,11 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
return
D3DERR_OUTOFVIDEOMEMORY
;
}
object
->
lpVtbl
=
&
Direct3DVolume8_Vtbl
;
object
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateVolume
(
This
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
,
format
,
pool
,
&
object
->
wineD3DVolume
,
(
IUnknown
*
)
object
);
hr
=
volume_init
(
object
,
This
,
width
,
height
,
depth
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) CreateVolume failed, returning %#x
\n
"
,
iface
,
hr
);
WARN
(
"Failed to initialize volume, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
volume
=
NULL
;
return
hr
;
}
...
...
@@ -2769,7 +2765,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
object
->
container
=
superior
;
object
->
forwardReference
=
superior
;
TRACE
(
"(%p) Created volume %p
\n
"
,
iface
,
*
volume
);
TRACE
(
"(%p) Created volume %p
\n
"
,
iface
,
object
);
return
hr
;
}
...
...
dlls/d3d8/volume.c
View file @
ff923245
...
...
@@ -202,7 +202,7 @@ static HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface) {
return
hr
;
}
const
IDirect3DVolume8Vtbl
Direct3DVolume8_Vtbl
=
static
const
IDirect3DVolume8Vtbl
Direct3DVolume8_Vtbl
=
{
/* IUnknown */
IDirect3DVolume8Impl_QueryInterface
,
...
...
@@ -228,3 +228,22 @@ ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume) {
volumeParent
->
forwardReference
=
NULL
;
return
IDirect3DVolume8_Release
((
IDirect3DVolume8
*
)
volumeParent
);
}
HRESULT
volume_init
(
IDirect3DVolume8Impl
*
volume
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
)
{
HRESULT
hr
;
volume
->
lpVtbl
=
&
Direct3DVolume8_Vtbl
;
volume
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateVolume
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
,
format
,
pool
,
&
volume
->
wineD3DVolume
,
(
IUnknown
*
)
volume
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create wined3d volume, hr %#x.
\n
"
,
hr
);
return
hr
;
}
return
D3D_OK
;
}
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