From fdcb891ed3b77a8c22080795da74419976284b3f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 29 Feb 2020 00:18:50 +1000 Subject: [PATCH] GPU: Fix incorrect detection of 480i mode --- src/core/gpu.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/gpu.h b/src/core/gpu.h index d0d23e887..974bc2453 100644 --- a/src/core/gpu.h +++ b/src/core/gpu.h @@ -373,8 +373,16 @@ protected: BitField dma_direction; BitField drawing_even_line; - bool IsMaskingEnabled() const { return (bits & ((1 << 11) | (1 << 12))) != 0; } - bool In480iMode() const { return (bits & ((1 << 22) | (1 << 19))) != 0; } + bool IsMaskingEnabled() const + { + static constexpr u32 MASK = ((1 << 11) | (1 << 12)); + return ((bits & MASK) != 0); + } + bool In480iMode() const + { + static constexpr u32 MASK = (1 << 19) | (1 << 22); + return ((bits & MASK) == MASK); + } // During transfer/render operations, if ((dst_pixel & mask_and) == mask_and) { pixel = src_pixel | mask_or } u16 GetMaskAND() const { return check_mask_before_draw ? 0x8000 : 0x0000; }