d3dx9/tests: Use SetRect() instead of coding it.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-06-28 10:32:31 +02:00 committed by Alexandre Julliard
parent 6329f37d5c
commit 30ee087d06
1 changed files with 4 additions and 6 deletions

View File

@ -377,12 +377,10 @@ static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *t
This->sprites[This->sprite_count].texw=texdesc.Width; This->sprites[This->sprite_count].texw=texdesc.Width;
This->sprites[This->sprite_count].texh=texdesc.Height; This->sprites[This->sprite_count].texh=texdesc.Height;
if(rect==NULL) { if (rect)
This->sprites[This->sprite_count].rect.left=0; This->sprites[This->sprite_count].rect = *rect;
This->sprites[This->sprite_count].rect.top=0; else
This->sprites[This->sprite_count].rect.right=texdesc.Width; SetRect(&This->sprites[This->sprite_count].rect, 0, 0, texdesc.Width, texdesc.Height);
This->sprites[This->sprite_count].rect.bottom=texdesc.Height;
} else This->sprites[This->sprite_count].rect=*rect;
if(center==NULL) { if(center==NULL) {
This->sprites[This->sprite_count].center.x=0.0f; This->sprites[This->sprite_count].center.x=0.0f;