mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ddraw: Only output a warning when clearing a viewport without background material.
This commit is contained in:
parent
4ff220f94b
commit
27a0b8a5f0
1 changed files with 6 additions and 9 deletions
|
@ -665,16 +665,13 @@ static HRESULT WINAPI d3d_viewport_Clear(IDirect3DViewport3 *iface,
|
|||
|
||||
if (flags & D3DCLEAR_TARGET)
|
||||
{
|
||||
if (This->background == NULL) {
|
||||
ERR(" Trying to clear the color buffer without background material!\n");
|
||||
}
|
||||
if (!This->background)
|
||||
WARN("No background material set.\n");
|
||||
else
|
||||
{
|
||||
color = ((int)((This->background->mat.u.diffuse.u1.r) * 255) << 16)
|
||||
| ((int) ((This->background->mat.u.diffuse.u2.g) * 255) << 8)
|
||||
| ((int) ((This->background->mat.u.diffuse.u3.b) * 255) << 0)
|
||||
| ((int) ((This->background->mat.u.diffuse.u4.a) * 255) << 24);
|
||||
}
|
||||
color = D3DRGBA(This->background->mat.u.diffuse.u1.r,
|
||||
This->background->mat.u.diffuse.u2.g,
|
||||
This->background->mat.u.diffuse.u3.b,
|
||||
This->background->mat.u.diffuse.u4.a);
|
||||
}
|
||||
|
||||
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
|
||||
|
|
Loading…
Reference in a new issue