Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
34c0055c
Commit
34c0055c
authored
Nov 23, 2020
by
Matteo Bruni
Committed by
Alexandre Julliard
Nov 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Correctly handle sprites array reallocation.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d8c9671d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
sprite.c
dlls/d3dx9_36/sprite.c
+7
-3
No files found.
dlls/d3dx9_36/sprite.c
View file @
34c0055c
...
...
@@ -342,6 +342,7 @@ static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *t
const
RECT
*
rect
,
const
D3DXVECTOR3
*
center
,
const
D3DXVECTOR3
*
position
,
D3DCOLOR
color
)
{
struct
d3dx9_sprite
*
This
=
impl_from_ID3DXSprite
(
iface
);
struct
sprite
*
new_sprites
;
D3DSURFACE_DESC
texdesc
;
TRACE
(
"iface %p, texture %p, rect %s, center %p, position %p, color 0x%08x.
\n
"
,
...
...
@@ -357,9 +358,12 @@ static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *t
}
else
if
(
This
->
allocated_sprites
<=
This
->
sprite_count
)
{
This
->
allocated_sprites
+=
This
->
allocated_sprites
/
2
;
This
->
sprites
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
sprites
,
This
->
allocated_sprites
*
sizeof
(
*
This
->
sprites
));
new_sprites
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
sprites
,
This
->
allocated_sprites
*
2
*
sizeof
(
*
This
->
sprites
));
if
(
!
new_sprites
)
return
E_OUTOFMEMORY
;
This
->
sprites
=
new_sprites
;
This
->
allocated_sprites
*=
2
;
}
This
->
sprites
[
This
->
sprite_count
].
texture
=
texture
;
if
(
!
(
This
->
flags
&
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
))
...
...
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