mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 14:35:41 -04:00
Merge pull request #1111 from ggrtk/gpu-sw-fix
GPU/SW: Fix 16-bit wraparound output crashing
This commit is contained in:
commit
1fa0903fa9
@ -282,14 +282,14 @@ void GPU_SW::CopyOut15Bit(u32 src_x, u32 src_y, u32 width, u32 height, u32 field
|
|||||||
{
|
{
|
||||||
const u16* src_row_ptr = &m_vram_ptr[(src_y % VRAM_HEIGHT) * VRAM_WIDTH];
|
const u16* src_row_ptr = &m_vram_ptr[(src_y % VRAM_HEIGHT) * VRAM_WIDTH];
|
||||||
OutputPixelType* dst_row_ptr = reinterpret_cast<OutputPixelType*>(dst_ptr);
|
OutputPixelType* dst_row_ptr = reinterpret_cast<OutputPixelType*>(dst_ptr);
|
||||||
|
|
||||||
for (u32 col = src_x; col < end_x; col++)
|
for (u32 col = src_x; col < end_x; col++)
|
||||||
{
|
|
||||||
*(dst_row_ptr++) = VRAM16ToOutput<display_format, OutputPixelType>(src_row_ptr[col % VRAM_WIDTH]);
|
*(dst_row_ptr++) = VRAM16ToOutput<display_format, OutputPixelType>(src_row_ptr[col % VRAM_WIDTH]);
|
||||||
|
|
||||||
src_y += (1 << interleaved_shift);
|
src_y += (1 << interleaved_shift);
|
||||||
dst_ptr += dst_stride;
|
dst_ptr += dst_stride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!interlaced)
|
if (!interlaced)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user