clamp framebuffer reading to frame buffer coordinates. not sure this is accurate, but it stops it crashing when negative coordinates are used. [smf]

This commit is contained in:
smf- 2013-01-22 00:01:49 +00:00
parent 9a829fa120
commit 6ac8987ebd

View File

@ -3663,7 +3663,7 @@ void psxgpu_device::gpu_read( UINT32 *p_ram, INT32 n_size )
for( n_pixel = 0; n_pixel < 2; n_pixel++ )
{
data.w.l = data.w.h;
data.w.h = *( p_p_vram[ n_vramy + ( m_packet.n_entry[ 1 ] >> 16 ) ] + n_vramx + ( m_packet.n_entry[ 1 ] & 0xffff ) );
data.w.h = *( p_p_vram[ ( n_vramy + ( m_packet.n_entry[ 1 ] >> 16 ) ) & 0x3ff ] + ( ( n_vramx + ( m_packet.n_entry[ 1 ] & 0xffff ) ) & 0x3ff ) );
n_vramx++;
if( n_vramx >= ( m_packet.n_entry[ 2 ] & 0xffff ) )
{