summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-09 04:26:26 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-09 04:26:26 +0000
commitd3e6e3d46c2474441f6e82aff344cb7103137766 (patch)
tree294304bbcb08be9680b887b6dd5a2d3e74c4a31a /plugins
parent2ed6a71dd24b21ca86b140d7e0a5585a167bc21c (diff)
downloadpcsxr-d3e6e3d46c2474441f6e82aff344cb7103137766.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@36461 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/draw.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c
index 596a1dec..4c4a3f4f 100644
--- a/plugins/dfxvideo/draw.c
+++ b/plugins/dfxvideo/draw.c
@@ -1408,22 +1408,35 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y)
unsigned int startxy;
uint32_t lu;unsigned short s;
unsigned short row,column;
- unsigned short dx=PreviousPSXDisplay.Range.x1;
- unsigned short dy=PreviousPSXDisplay.DisplayMode.y;
+ unsigned short dx = PreviousPSXDisplay.Range.x1;
+ unsigned short dy = PreviousPSXDisplay.DisplayMode.y;
int Y,U,V, R,G,B;
- int32_t lPitch=PSXDisplay.DisplayMode.x << 2;
+ int32_t lPitch = PSXDisplay.DisplayMode.x << 2;
uint32_t *destpix;
if (PreviousPSXDisplay.Range.y0) // centering needed?
{
- memset(surf, 0, (PreviousPSXDisplay.Range.y0 >> 1) * lPitch);
+ for (column = 0; column < PreviousPSXDisplay.Range.y0 >> 1; column++)
+ {
+ destpix = (uint32_t *)(surf + (column * lPitch));
+ for (row = 0; row < dx; row++)
+ {
+ destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128;
+ }
+ }
dy -= PreviousPSXDisplay.Range.y0;
surf += (PreviousPSXDisplay.Range.y0 >> 1) * lPitch;
- memset(surf + dy * lPitch,
- 0, ((PreviousPSXDisplay.Range.y0 + 1) >> 1) * lPitch);
+ for (column = 0; column < (PreviousPSXDisplay.Range.y0 + 1) >> 1; column++)
+ {
+ destpix = (uint32_t *)(surf + dy * lPitch + (column * lPitch));
+ for (row = 0; row < dx; row++)
+ {
+ destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128;
+ }
+ }
}
if (PreviousPSXDisplay.Range.x0)
@@ -1431,7 +1444,10 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y)
for (column = 0; column < dy; column++)
{
destpix = (uint32_t *)(surf + (column * lPitch));
- memset(destpix, 0, PreviousPSXDisplay.Range.x0 << 2);
+ for (row = 0; row < PreviousPSXDisplay.Range.x0; row++)
+ {
+ destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128;
+ }
}
surf += PreviousPSXDisplay.Range.x0 << 2;
}