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
bdd55d08
Commit
bdd55d08
authored
Mar 04, 2009
by
Tony Wasserka
Committed by
Alexandre Julliard
Mar 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement ID3DXSprite_OnLostDevice/OnResetDevice.
parent
17a866df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
sprite.c
dlls/d3dx9_36/sprite.c
+30
-9
No files found.
dlls/d3dx9_36/sprite.c
View file @
bdd55d08
...
...
@@ -410,15 +410,39 @@ static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface)
static
HRESULT
WINAPI
ID3DXSpriteImpl_OnLostDevice
(
LPD3DXSPRITE
iface
)
{
ID3DXSpriteImpl
*
This
=
(
ID3DXSpriteImpl
*
)
iface
;
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
stateblock
)
IDirect3DStateBlock9_Release
(
This
->
stateblock
);
if
(
This
->
vdecl
)
IDirect3DVertexDeclaration9_Release
(
This
->
vdecl
);
This
->
vdecl
=
NULL
;
This
->
stateblock
=
NULL
;
/* Reset some variables */
ID3DXSprite_OnResetDevice
(
iface
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXSpriteImpl_OnResetDevice
(
LPD3DXSPRITE
iface
)
{
ID3DXSpriteImpl
*
This
=
(
ID3DXSpriteImpl
*
)
iface
;
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
int
i
;
TRACE
(
"(%p)
\n
"
,
This
);
for
(
i
=
0
;
i
<
This
->
sprite_count
;
i
++
)
if
(
This
->
sprites
[
i
].
texture
)
IDirect3DTexture9_Release
(
This
->
sprites
[
i
].
texture
);
This
->
sprite_count
=
0
;
This
->
flags
=
0
;
This
->
ready
=
FALSE
;
/* keep matrices */
/* device objects get restored on Begin */
return
D3D_OK
;
}
static
const
ID3DXSpriteVtbl
D3DXSprite_Vtbl
=
...
...
@@ -465,18 +489,15 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite)
D3DXMatrixIdentity
(
&
object
->
transform
);
D3DXMatrixIdentity
(
&
object
->
view
);
object
->
flags
=
0
;
object
->
ready
=
FALSE
;
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
object
->
texfilter_caps
=
caps
.
TextureFilterCaps
;
object
->
maxanisotropy
=
caps
.
MaxAnisotropy
;
object
->
alphacmp_caps
=
caps
.
AlphaCmpCaps
;
ID3DXSprite_OnResetDevice
((
ID3DXSprite
*
)
object
);
object
->
sprites
=
NULL
;
object
->
sprite_count
=
0
;
object
->
allocated_sprites
=
0
;
*
sprite
=
(
ID3DXSprite
*
)
object
;
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