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
ca1ee4a7
Commit
ca1ee4a7
authored
Jun 15, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Avoid unsafe IDirect3DVertexBuffer to object casts.
parent
d010dac8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
ddraw.c
dlls/ddraw/ddraw.c
+13
-5
No files found.
dlls/ddraw/ddraw.c
View file @
ca1ee4a7
...
...
@@ -4968,17 +4968,25 @@ static HRESULT WINAPI d3d3_CreateVertexBuffer(IDirect3D3 *iface, D3DVERTEXBUFFER
IDirect3DVertexBuffer
**
vertex_buffer
,
DWORD
flags
,
IUnknown
*
outer_unknown
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirect3D3
(
iface
);
IDirect3DVertexBufferImpl
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, desc %p, vertex_buffer %p, flags %#x, outer_unknown %p.
\n
"
,
iface
,
desc
,
vertex_buffer
,
flags
,
outer_unknown
);
if
(
outer_unknown
)
return
CLASS_E_NOAGGREGATION
;
if
(
outer_unknown
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
vertex_buffer
||
!
desc
)
return
DDERR_INVALIDPARAMS
;
hr
=
d3d7_CreateVertexBuffer
(
&
This
->
IDirect3D7_iface
,
desc
,
(
IDirect3DVertexBuffer7
**
)
vertex_buffer
,
flags
);
if
(
*
vertex_buffer
)
*
vertex_buffer
=
(
IDirect3DVertexBuffer
*
)
&
((
IDirect3DVertexBufferImpl
*
)
*
vertex_buffer
)
->
IDirect3DVertexBuffer_vtbl
;
hr
=
d3d_vertex_buffer_create
(
&
object
,
This
,
desc
);
if
(
hr
==
D3D_OK
)
{
TRACE
(
"Created vertex buffer %p.
\n
"
,
object
);
*
vertex_buffer
=
(
IDirect3DVertexBuffer
*
)
object
;
}
else
WARN
(
"Failed to create vertex buffer, hr %#x.
\n
"
,
hr
);
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