mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Turn EFB_WIDTH/EFB_HEIGHT into constexpr
https://bugs.dolphin-emu.org/issues/11692#note-5 Also change const into constexpr while we're at it.
This commit is contained in:
parent
e1a5eece60
commit
ced2306fc5
2 changed files with 7 additions and 9 deletions
|
@ -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++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue