Fix rounding of right edge of viewport mark dirty area

Could result in vehicles leaving pixels behind when moving left
pull/647/head
Jonathan G Rennison 4 months ago
parent 41299128e5
commit 28b156d95c

@ -4392,7 +4392,7 @@ void MarkViewportDirty(Viewport * const vp, int left, int top, int right, int bo
uint x = std::max<int>(0, UnScaleByZoomLower(left, vp->zoom) - vp->dirty_block_left_margin) >> vp->GetDirtyBlockWidthShift();
uint y = UnScaleByZoomLower(top, vp->zoom) >> vp->GetDirtyBlockHeightShift();
uint w = (std::max<int>(0, UnScaleByZoomLower(right, vp->zoom) - 1 - vp->dirty_block_left_margin) >> vp->GetDirtyBlockWidthShift()) + 1 - x;
uint w = (std::max<int>(0, UnScaleByZoom(right, vp->zoom) - 1 - vp->dirty_block_left_margin) >> vp->GetDirtyBlockWidthShift()) + 1 - x;
uint h = ((UnScaleByZoom(bottom, vp->zoom) - 1) >> vp->GetDirtyBlockHeightShift()) + 1 - y;
uint column_skip = vp->dirty_blocks_per_column - h;

Loading…
Cancel
Save