GPU: Fix incorrect lightgun line with force progressive

This commit is contained in:
Stenzek 2024-08-04 17:54:19 +10:00
parent 59a1cca858
commit 6c0a0e6203
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -1131,7 +1131,7 @@ bool GPU::ConvertDisplayCoordinatesToBeamTicksAndLines(float display_x, float di
return false;
}
*out_line = (static_cast<u32>(std::round(display_y)) >> BoolToUInt8(m_GPUSTAT.vertical_interlace)) +
*out_line = (static_cast<u32>(std::round(display_y)) >> BoolToUInt8(IsInterlacedDisplayEnabled())) +
m_crtc_state.vertical_visible_start;
*out_tick = static_cast<u32>(System::ScaleTicksToOverclock(
static_cast<TickCount>(std::round(display_x * static_cast<float>(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;

View File

@ -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.