amstream: Use SetRect() instead of open coding it.

Michael Stefaniuc mstefani at redhat.de
Tue Jun 21 07:14:18 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/amstream/mediastream.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index 0ba9eb8..188ab88 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -1046,11 +1046,7 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD
         DDSURFACEDESC desc = { sizeof(desc) };
         hr = IDirectDrawSurface_GetSurfaceDesc(object->surface, &desc);
         if (hr == S_OK)
-        {
-            object->rect.left = object->rect.top = 0;
-            object->rect.right = desc.dwWidth;
-            object->rect.bottom = desc.dwHeight;
-        }
+            SetRect(&object->rect, 0, 0, desc.dwWidth, desc.dwHeight);
     }
 
     *ddraw_stream_sample = &object->IDirectDrawStreamSample_iface;
-- 
2.4.11



More information about the wine-patches mailing list