diff options
author | Exophase | 2011-12-23 18:51:42 +0200 |
---|---|---|
committer | notaz | 2011-12-23 18:51:42 +0200 |
commit | 1f88961fb70bfdffa9c60fcc0c5c9cdc8108e742 (patch) | |
tree | d75f8432a4285fa02aefbb0e0f258afa6bef4c23 /plugins/gpu_neon/psx_gpu/psx_gpu.c | |
parent | bf2341d5f91b11bf6a9aae9bb281f23f3dd53aa9 (diff) | |
download | pcsx_rearmed-1f88961fb70bfdffa9c60fcc0c5c9cdc8108e742.tar.gz pcsx_rearmed-1f88961fb70bfdffa9c60fcc0c5c9cdc8108e742.tar.bz2 pcsx_rearmed-1f88961fb70bfdffa9c60fcc0c5c9cdc8108e742.zip |
psx_gpu: some argument checks
Diffstat (limited to 'plugins/gpu_neon/psx_gpu/psx_gpu.c')
-rw-r--r-- | plugins/gpu_neon/psx_gpu/psx_gpu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c index 5c49b22..49e8c8b 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c @@ -3767,7 +3767,7 @@ void render_sprite(psx_gpu_struct *psx_gpu, s32 x, s32 y, u32 u, u32 v, RENDER_FLAGS_TEXTURE_MAP); render_state |= (psx_gpu->render_state_base & ~RENDER_STATE_DITHER); - + if((psx_gpu->render_state != render_state) || (psx_gpu->primitive_type != PRIMITIVE_TYPE_SPRITE)) { @@ -4316,6 +4316,9 @@ void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags, void render_block_fill(psx_gpu_struct *psx_gpu, u32 color, u32 x, u32 y, u32 width, u32 height) { + if((width == 0) || (height == 0)) + return; + invalidate_texture_cache_region(psx_gpu, x, y, x + width - 1, y + height - 1); #ifndef NEON_BUILD @@ -4350,6 +4353,9 @@ void render_block_copy(psx_gpu_struct *psx_gpu, u16 *source, u32 x, u32 y, u16 *vram_ptr = psx_gpu->vram_ptr + x + (y * 1024); u32 draw_x, draw_y; + if((width == 0) || (height == 0)) + return; + invalidate_texture_cache_region(psx_gpu, x, y, x + width - 1, y + height - 1); for(draw_y = 0; draw_y < height; draw_y++) |