mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-30 17:05:43 -04:00
GPU/Software: Fix broken display when VRAM is X-offset
This commit is contained in:
parent
ee5c3cb91b
commit
f0a3e66d08
@ -83,18 +83,17 @@ void GPU_SW::UpdateDisplay()
|
|||||||
|
|
||||||
if (!m_system->GetSettings().debugging.show_vram)
|
if (!m_system->GetSettings().debugging.show_vram)
|
||||||
{
|
{
|
||||||
// TODO: Handle interlacing
|
|
||||||
const u32 vram_offset_x = m_crtc_state.display_vram_left;
|
|
||||||
const u32 vram_offset_y = m_crtc_state.display_vram_top;
|
|
||||||
const u32 display_width = m_crtc_state.display_vram_width;
|
|
||||||
const u32 display_height = m_crtc_state.display_vram_height;
|
|
||||||
|
|
||||||
if (m_GPUSTAT.display_disable)
|
if (m_GPUSTAT.display_disable)
|
||||||
{
|
{
|
||||||
m_host_display->ClearDisplayTexture();
|
m_host_display->ClearDisplayTexture();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (IsInterlacedDisplayEnabled())
|
|
||||||
|
const u32 vram_offset_x = m_crtc_state.display_vram_left;
|
||||||
|
const u32 vram_offset_y = m_crtc_state.display_vram_top;
|
||||||
|
const u32 display_width = m_crtc_state.display_vram_width;
|
||||||
|
const u32 display_height = m_crtc_state.display_vram_height;
|
||||||
|
if (IsInterlacedDisplayEnabled())
|
||||||
{
|
{
|
||||||
const u32 field = GetInterlacedField();
|
const u32 field = GetInterlacedField();
|
||||||
if (m_GPUSTAT.display_area_color_depth_24)
|
if (m_GPUSTAT.display_area_color_depth_24)
|
||||||
@ -124,11 +123,11 @@ void GPU_SW::UpdateDisplay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_host_display->UpdateTexture(m_display_texture.get(), m_crtc_state.regs.X, 0, display_width, display_height,
|
const u32 texture_offset_x = m_crtc_state.display_vram_left - m_crtc_state.regs.X;
|
||||||
|
m_host_display->UpdateTexture(m_display_texture.get(), texture_offset_x, 0, display_width, display_height,
|
||||||
m_display_texture_buffer.data(), display_width * sizeof(u32));
|
m_display_texture_buffer.data(), display_width * sizeof(u32));
|
||||||
m_host_display->SetDisplayTexture(m_display_texture->GetHandle(), VRAM_WIDTH, VRAM_HEIGHT,
|
m_host_display->SetDisplayTexture(m_display_texture->GetHandle(), VRAM_WIDTH, VRAM_HEIGHT, texture_offset_x, 0,
|
||||||
m_crtc_state.display_vram_left - m_crtc_state.regs.X, 0, display_width,
|
display_width, display_height);
|
||||||
display_height);
|
|
||||||
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
|
m_host_display->SetDisplayParameters(m_crtc_state.display_width, m_crtc_state.display_height,
|
||||||
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
|
m_crtc_state.display_origin_left, m_crtc_state.display_origin_top,
|
||||||
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
|
m_crtc_state.display_vram_width, m_crtc_state.display_vram_height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user