[PATCH 3/5] wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill().
Henri Verbeet
hverbeet at codeweavers.com
Thu Aug 4 12:53:29 CDT 2011
---
dlls/wined3d/device.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 19aa3d0..ee08b7d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4981,6 +4981,8 @@ HRESULT CDECL wined3d_device_delete_patch(struct wined3d_device *device, UINT ha
HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device,
struct wined3d_surface *surface, const RECT *rect, const WINED3DCOLORVALUE *color)
{
+ RECT r;
+
TRACE("device %p, surface %p, rect %s, color {%.8e, %.8e, %.8e, %.8e}.\n",
device, surface, wine_dbgstr_rect(rect),
color->r, color->g, color->b, color->a);
@@ -4991,6 +4993,12 @@ HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device,
return WINED3DERR_INVALIDCALL;
}
+ if (!rect)
+ {
+ SetRect(&r, 0, 0, surface->resource.width, surface->resource.height);
+ rect = &r;
+ }
+
return surface_color_fill(surface, rect, color);
}
--
1.7.3.4
More information about the wine-patches
mailing list