Henri Verbeet : wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill().
Alexandre Julliard
julliard at winehq.org
Fri Aug 5 10:20:48 CDT 2011
Module: wine
Branch: master
Commit: 7e8e7ecebb2b2574cf185fa92e171844efe895bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e8e7ecebb2b2574cf185fa92e171844efe895bb
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Aug 4 19:53:29 2011 +0200
wined3d: Always pass a non-NULL rectangle to surface_color_fill() in wined3d_device_color_fill().
---
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);
}
More information about the wine-cvs
mailing list