diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 19aa3d029e2..ee08b7d3d4d 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); }