Skip to content

Commit 7d66569

Browse files
committed
GPU/HW: Fix bobbing screen with interlacing disabled
Fixes bobbing screen in Tom and Jerry in House Trap.
1 parent f856a8a commit 7d66569

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/gpu_hw_d3d11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ void GPU_HW_D3D11::UpdateDisplay()
610610
m_context->OMSetDepthStencilState(m_depth_disabled_state.Get(), 0);
611611
m_context->PSSetShaderResources(0, 1, m_vram_texture.GetD3DSRVArray());
612612

613-
const u32 reinterpret_field_offset = GetInterlacedDisplayField();
613+
const u32 reinterpret_field_offset = (interlaced != InterlacedRenderMode::None) ? GetInterlacedDisplayField() : 0;
614614
const u32 reinterpret_start_x = m_crtc_state.regs.X * m_resolution_scale;
615615
const u32 reinterpret_crop_left = (m_crtc_state.display_vram_left - m_crtc_state.regs.X) * m_resolution_scale;
616616
const u32 uniforms[4] = {reinterpret_start_x, scaled_vram_offset_y + reinterpret_field_offset,

src/core/gpu_hw_opengl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ void GPU_HW_OpenGL::UpdateDisplay()
613613
m_vram_texture.Bind();
614614

615615
const u8 height_div2 = BoolToUInt8(interlaced == GPU_HW::InterlacedRenderMode::SeparateFields);
616-
const u32 reinterpret_field_offset = GetInterlacedDisplayField();
616+
const u32 reinterpret_field_offset = (interlaced != InterlacedRenderMode::None) ? GetInterlacedDisplayField() : 0;
617617
const u32 scaled_flipped_vram_offset_y = m_vram_texture.GetHeight() - scaled_vram_offset_y -
618618
reinterpret_field_offset - (scaled_display_height >> height_div2);
619619
const u32 reinterpret_start_x = m_crtc_state.regs.X * m_resolution_scale;

0 commit comments

Comments
 (0)