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
c0d05d9f
Commit
c0d05d9f
authored
Oct 28, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Initialize the actual array in d3drm_visual_array_create() as well.
parent
bf235a66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
frame.c
dlls/d3drm/frame.c
+19
-19
No files found.
dlls/d3drm/frame.c
View file @
c0d05d9f
...
...
@@ -315,15 +315,32 @@ static const struct IDirect3DRMVisualArrayVtbl d3drm_visual_array_vtbl =
d3drm_visual_array_GetElement
,
};
static
struct
d3drm_visual_array
*
d3drm_visual_array_create
(
void
)
static
struct
d3drm_visual_array
*
d3drm_visual_array_create
(
unsigned
int
visual_count
,
IDirect3DRMVisual
**
visuals
)
{
struct
d3drm_visual_array
*
array
;
unsigned
int
i
;
if
(
!
(
array
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
array
))))
return
NULL
;
array
->
IDirect3DRMVisualArray_iface
.
lpVtbl
=
&
d3drm_visual_array_vtbl
;
array
->
ref
=
1
;
array
->
size
=
visual_count
;
if
(
visual_count
)
{
if
(
!
(
array
->
visuals
=
HeapAlloc
(
GetProcessHeap
(),
0
,
visual_count
*
sizeof
(
*
array
->
visuals
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
NULL
;
}
for
(
i
=
0
;
i
<
visual_count
;
++
i
)
{
array
->
visuals
[
i
]
=
visuals
[
i
];
IDirect3DRMVisual_AddRef
(
array
->
visuals
[
i
]);
}
}
return
array
;
}
...
...
@@ -765,26 +782,9 @@ static HRESULT WINAPI d3drm_frame2_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3
if
(
!
visuals
)
return
D3DRMERR_BADVALUE
;
if
(
!
(
array
=
d3drm_visual_array_create
()))
if
(
!
(
array
=
d3drm_visual_array_create
(
frame
->
nb_visuals
,
frame
->
visuals
)))
return
E_OUTOFMEMORY
;
array
->
size
=
frame
->
nb_visuals
;
if
(
frame
->
nb_visuals
)
{
ULONG
i
;
if
(
!
(
array
->
visuals
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame
->
nb_visuals
*
sizeof
(
*
array
->
visuals
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
frame
->
nb_visuals
;
++
i
)
{
array
->
visuals
[
i
]
=
frame
->
visuals
[
i
];
IDirect3DRMVisual_AddRef
(
frame
->
visuals
[
i
]);
}
}
*
visuals
=
&
array
->
IDirect3DRMVisualArray_iface
;
return
D3DRM_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