diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-04-28 20:37:25 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-28 20:37:25 +1000 |
| commit | d2d8d7ce90f92bb45e2d8b645ec72f104fee5e6b (patch) | |
| tree | 5ea75bfb66302aa45876b4be1e4b1e3712506900 /Source/Core/VideoBackends/Software/EfbInterface.cpp | |
| parent | e17bb8cfdf9d802ff3fff455f88508700d1a87cc (diff) | |
| parent | ced2306fc5afdde8c3551ac3257c6298d39d2e37 (diff) | |
Merge pull request #8051 from JosJuice/efb-constexpr
Turn EFB_WIDTH/EFB_HEIGHT into constexpr
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index 8eebb375d3..9548dece5a 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -588,8 +588,9 @@ 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. - u16 y_prev = static_cast<u16>(std::max(clamp_top ? source_rect.top : 0, y - 1)); - u16 y_next = static_cast<u16>(std::min(clamp_bottom ? source_rect.bottom : EFB_HEIGHT, y + 1)); + 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)); // Get a scanline of YUV pixels in 4:4:4 format for (int i = 1, x = left; x < right; i++, x++) |
