Michael Stefaniuc : d3dx9/tests: Use SetRect() instead of coding it.
Module: wine Branch: master Commit: 30ee087d065b8f4d68b08be6ba847699131f5494 URL: http://source.winehq.org/git/wine.git/?a=commit;h=30ee087d065b8f4d68b08be6ba... Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jun 28 10:32:31 2016 +0200 d3dx9/tests: Use SetRect() instead of coding it. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/sprite.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c index 4a7437f..17ad16a 100644 --- a/dlls/d3dx9_36/sprite.c +++ b/dlls/d3dx9_36/sprite.c @@ -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].texh=texdesc.Height; - if(rect==NULL) { - This->sprites[This->sprite_count].rect.left=0; - This->sprites[This->sprite_count].rect.top=0; - This->sprites[This->sprite_count].rect.right=texdesc.Width; - This->sprites[This->sprite_count].rect.bottom=texdesc.Height; - } else This->sprites[This->sprite_count].rect=*rect; + if (rect) + This->sprites[This->sprite_count].rect = *rect; + else + SetRect(&This->sprites[This->sprite_count].rect, 0, 0, texdesc.Width, texdesc.Height); if(center==NULL) { This->sprites[This->sprite_count].center.x=0.0f;
participants (1)
-
Alexandre Julliard