mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
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:
parent
9a829fa120
commit
6ac8987ebd
@ -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 ) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user