diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index 0d8ff3ee8..dff47d5c1 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -1131,7 +1131,7 @@ bool GPU::ConvertDisplayCoordinatesToBeamTicksAndLines(float display_x, float di return false; } - *out_line = (static_cast(std::round(display_y)) >> BoolToUInt8(m_GPUSTAT.vertical_interlace)) + + *out_line = (static_cast(std::round(display_y)) >> BoolToUInt8(IsInterlacedDisplayEnabled())) + m_crtc_state.vertical_visible_start; *out_tick = static_cast(System::ScaleTicksToOverclock( static_cast(std::round(display_x * static_cast(m_crtc_state.dot_clock_divider))))) + @@ -1259,7 +1259,7 @@ void GPU::WriteGP1(u32 value) DEBUG_LOG("Display {}", disable ? "disabled" : "enabled"); SynchronizeCRTC(); - if (!m_GPUSTAT.display_disable && disable && m_GPUSTAT.vertical_interlace && !m_force_progressive_scan) + if (!m_GPUSTAT.display_disable && disable && IsInterlacedDisplayEnabled()) ClearDisplay(); m_GPUSTAT.display_disable = disable; diff --git a/src/core/gpu.h b/src/core/gpu.h index d1398d3cd..b15163524 100644 --- a/src/core/gpu.h +++ b/src/core/gpu.h @@ -134,13 +134,13 @@ public: /// Returns true if scanout should be interlaced. ALWAYS_INLINE bool IsInterlacedDisplayEnabled() const { - return (!m_force_progressive_scan) && m_GPUSTAT.vertical_interlace; + return (!m_force_progressive_scan && m_GPUSTAT.vertical_interlace); } /// Returns true if interlaced rendering is enabled and force progressive scan is disabled. ALWAYS_INLINE bool IsInterlacedRenderingEnabled() const { - return (!m_force_progressive_scan) && m_GPUSTAT.SkipDrawingToActiveField(); + return (!m_force_progressive_scan && m_GPUSTAT.SkipDrawingToActiveField()); } /// Returns true if we're in PAL mode, otherwise false if NTSC.