From 24e138ecb384fb347cb4c9b88aed69283d6e83dc Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Thu, 5 Nov 2009 13:35:21 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@35732 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfxvideo/draw.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index 6517594c..3b477b10 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -1352,11 +1352,20 @@ void BlitScreen32(unsigned char *surf, int32_t x, int32_t y) if (PreviousPSXDisplay.Range.y0) // centering needed? { + memset(surf, 0, PreviousPSXDisplay.Range.y0 * lPitch); surf += PreviousPSXDisplay.Range.y0 * lPitch; dy -= PreviousPSXDisplay.Range.y0; } - surf += PreviousPSXDisplay.Range.x0 << 2; + if (PreviousPSXDisplay.Range.x0) + { + for (column = 0; column < dy; column++) + { + destpix = (uint32_t *)(surf + (column * lPitch)); + memset(destpix, 0, PreviousPSXDisplay.Range.x0 << 2); + } + surf += PreviousPSXDisplay.Range.x0 << 2; + } if (PSXDisplay.RGB24) { @@ -1405,11 +1414,20 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) if (PreviousPSXDisplay.Range.y0) // centering needed? { + memset(surf, 0, PreviousPSXDisplay.Range.y0 * lPitch); surf += PreviousPSXDisplay.Range.y0 * lPitch; dy -= PreviousPSXDisplay.Range.y0; } - surf += PreviousPSXDisplay.Range.x0 << 2; + if (PreviousPSXDisplay.Range.x0) + { + for (column = 0; column < dy; column++) + { + destpix = (uint32_t *)(surf + (column * lPitch)); + memset(destpix, 0, PreviousPSXDisplay.Range.x0 << 2); + } + surf += PreviousPSXDisplay.Range.x0 << 2; + } if (PSXDisplay.RGB24) { -- cgit v1.2.3