Don't InvalidateCursor unless it's actually in the viewport

This commit is contained in:
Mike Griese 2021-07-28 15:33:06 -05:00
parent db3bdcb8aa
commit 58f31f1b6b
3 changed files with 5 additions and 4 deletions

View file

@ -281,10 +281,10 @@ void Renderer::TriggerRedrawCursor(const COORD* const pcoord)
// The region is clamped within the viewport boundaries and we only
// trigger a redraw if the region is not empty.
Viewport view = _pData->GetViewport();
cursorView = view.Clamp(cursorView);
if (cursorView.IsValid())
if (view.IsInBounds(cursorView))
// if (cursorView.IsValid())
{
cursorView = view.Clamp(cursorView);
const SMALL_RECT updateRect = view.ConvertToOrigin(cursorView).ToExclusive();
for (IRenderEngine* pEngine : _rgpEngines)
{

View file

@ -1189,6 +1189,7 @@ try
_invalidMap.translate(deltaCells, true);
_invalidScroll += deltaCells;
_allInvalid = _IsAllInvalid();
_lastCursor += deltaCells;
}
}

View file

@ -91,7 +91,7 @@ float4 main(float4 pos : SV_POSITION, float2 tex : TEXCOORD) : SV_TARGET
#endif
constexpr std::string_view nopPixelShaderString{ R"(
// Nop shader used for normal operations
// No-op shader used for normal operations
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings {