mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:06:04 +00:00
[WINESYNC] d3dx9: Don't release textures when D3DXSPRITE_DO_NOT_ADDREF_TEXTURE is specified.
Signed-off-by: Sven Baars <sbaars@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 9eda5c043047fd117441473651b2089b80a4ed80 by Sven Baars <sbaars@codeweavers.com>
This commit is contained in:
parent
fe25fbb5fe
commit
31f063ffbf
3 changed files with 27 additions and 7 deletions
|
@ -306,6 +306,20 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
|
|||
hr = ID3DXSprite_End(sprite);
|
||||
ok (hr == D3DERR_INVALIDCALL, "End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
||||
|
||||
/* Test D3DXSPRITE_DO_NOT_ADDREF_TEXTURE */
|
||||
hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE);
|
||||
ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255));
|
||||
ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
hr = ID3DXSprite_OnResetDevice(sprite);
|
||||
ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
check_ref((IUnknown*)tex2, 1);
|
||||
|
||||
hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE);
|
||||
ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255));
|
||||
ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
|
||||
IDirect3DDevice9_EndScene(device);
|
||||
check_release((IUnknown*)sprite, 0);
|
||||
check_release((IUnknown*)tex2, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue