Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions dist/wcdx/src/wcdx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,28 +253,26 @@ HRESULT STDMETHODCALLTYPE Wcdx::Present()
#endif

RECT activeRect = GetContentRect(clientRect);
if (_sizeChanged)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks totally reasonable to me. Please fix up the indentation of the guarded region and I'll merge the changes after that.


if (activeRect.right - activeRect.left < clientRect.right - clientRect.left)
{
if (activeRect.right - activeRect.left < clientRect.right - clientRect.left)
D3DRECT bars[] =
{
D3DRECT bars[] =
{
{ clientRect.left, clientRect.top, activeRect.left, activeRect.bottom },
{ activeRect.right, activeRect.top, clientRect.right, clientRect.bottom }
};
if (FAILED(hr = _device->Clear(2, bars, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 0.0f, 0)))
return hr;
}
else if (activeRect.bottom - activeRect.top < clientRect.bottom - clientRect.top)
{ clientRect.left, clientRect.top, activeRect.left, activeRect.bottom },
{ activeRect.right, activeRect.top, clientRect.right, clientRect.bottom }
};
if (FAILED(hr = _device->Clear(2, bars, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 0.0f, 0)))
return hr;
}
else if (activeRect.bottom - activeRect.top < clientRect.bottom - clientRect.top)
{
D3DRECT bars[] =
{
D3DRECT bars[] =
{
{ clientRect.left, clientRect.top, activeRect.right, activeRect.top },
{ activeRect.left, activeRect.bottom, clientRect.right, clientRect.bottom }
};
if (FAILED(hr = _device->Clear(2, bars, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 0.0f, 0)))
return hr;
}
{ clientRect.left, clientRect.top, activeRect.right, activeRect.top },
{ activeRect.left, activeRect.bottom, clientRect.right, clientRect.bottom }
};
if (FAILED(hr = _device->Clear(2, bars, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 0.0f, 0)))
return hr;
}

if (_dirty || _sizeChanged)
Expand Down