diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-11-18 17:48:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 17:48:33 -0500 |
| commit | dbaebdc585d562c25d4cf9360c8da6e078dcc1a6 (patch) | |
| tree | 4b5d604a2086d47a72b332e0bd2abbe7211c89b0 /Source/Core/VideoBackends/Software/EfbInterface.cpp | |
| parent | 6f4bbac528682389e34a1a4985820ee5137619c7 (diff) | |
| parent | 9bbc843542656f9b51bbedb1bdca8085677a2c56 (diff) | |
Merge pull request #10222 from phire/fix-copy-filter-clamping
Fix copy filter clamping
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index 9e730d4244..70d5c66e80 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -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. // Statistically, that could happen. const u16 y_prev = static_cast<u16>(std::max(clamp_top ? source_rect.top : 0, y - 1)); - const u16 y_next = - static_cast<u16>(std::min<int>(clamp_bottom ? source_rect.bottom : EFB_HEIGHT, y + 1)); + const u16 y_next = static_cast<u16>( + std::min<int>((clamp_bottom ? source_rect.bottom : EFB_HEIGHT) - 1, y + 1)); // Get a scanline of YUV pixels in 4:4:4 format for (int i = 1, x = left; x < right; i++, x++) |
