mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
VideoSoftware: Fix copy filter clamping
This commit is contained in:
parent
7128befb39
commit
9bbc843542
@ -593,8 +593,8 @@ void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const MathUtil::Rectangle<int>
|
|||||||
// In our implementation, the garbage just so happens to be the top or bottom row.
|
// In our implementation, the garbage just so happens to be the top or bottom row.
|
||||||
// Statistically, that could happen.
|
// Statistically, that could happen.
|
||||||
const u16 y_prev = static_cast<u16>(std::max(clamp_top ? source_rect.top : 0, y - 1));
|
const u16 y_prev = static_cast<u16>(std::max(clamp_top ? source_rect.top : 0, y - 1));
|
||||||
const u16 y_next =
|
const u16 y_next = static_cast<u16>(
|
||||||
static_cast<u16>(std::min<int>(clamp_bottom ? source_rect.bottom : EFB_HEIGHT, y + 1));
|
std::min<int>((clamp_bottom ? source_rect.bottom : EFB_HEIGHT) - 1, y + 1));
|
||||||
|
|
||||||
// Get a scanline of YUV pixels in 4:4:4 format
|
// Get a scanline of YUV pixels in 4:4:4 format
|
||||||
for (int i = 1, x = left; x < right; i++, x++)
|
for (int i = 1, x = left; x < right; i++, x++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user