summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 08:31:27 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 08:31:27 +0000
commit4ae23f11012be9ccdce399639ee5d4f44fd5a74c (patch)
tree07c11e45d74412e666258bbbf152593ab8742a44 /macosx/plugins/DFXVideo/macsrc/PluginGLView.m
parenta32304c24f21f766a678a08017e979ad071ae16f (diff)
downloadpcsxr-4ae23f11012be9ccdce399639ee5d4f44fd5a74c.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34798 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFXVideo/macsrc/PluginGLView.m')
-rw-r--r--macosx/plugins/DFXVideo/macsrc/PluginGLView.m33
1 files changed, 20 insertions, 13 deletions
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
index 79d55595..a27f641f 100644
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m
@@ -563,14 +563,19 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
for(column=0;column<dy;column++)
{
- startxy=((1024)*(column+y))+x;
- pD=(unsigned char *)&psxVuw[startxy];
+ startxy = (1024 * (column + y)) + x;
+ pD = (unsigned char *)&psxVuw[startxy];
- row=0;
+ row = 0;
// make sure the reads are aligned
while ((int)pD & 0x3) {
- *((unsigned long *)((surf)+(column*lPitch)+(row<<2)))=
+#ifdef __POWERPC__
+ *((unsigned long *)((surf)+(column*lPitch)+(row<<2))) =
(*(pD+0)<<16)|(*(pD+1)<<8)|*(pD+2);
+#else
+ *((unsigned long *)((surf)+(column*lPitch)+(row<<2))) =
+ (*(pD+2)<<16)|(*(pD+1)<<8)|*(pD+0);
+#endif
pD+=3;
row++;
}
@@ -615,26 +620,28 @@ void BlitScreen16NS(unsigned char * surf,long x,long y)
else
{
int LineOffset,SurfOffset;
- unsigned long * SRCPtr = (unsigned long *)(psxVuw +
- (y<<10) + x);
+ unsigned long * SRCPtr = (unsigned long *)(psxVuw + (y << 10) + x);
unsigned long * DSTPtr =
- ((unsigned long *)surf)+(PreviousPSXDisplay.Range.x0>>1);
+ ((unsigned long *)surf) + (PreviousPSXDisplay.Range.x0 >> 1);
- dx>>=1;
+ dx >>= 1;
LineOffset = 512 - dx;
- SurfOffset = (lPitch>>2) - dx;
+ SurfOffset = (lPitch >> 2) - dx;
for(column=0;column<dy;column++)
{
for(row=0;row<dx;row++)
{
+#ifdef __POWERPC__
lu=GETLE16D(SRCPtr++);
-
+#else
+ lu=*SRCPtr++;
+#endif
*DSTPtr++=
- ((lu<<10)&0x7c007c00)|
- ((lu)&0x3e003e0)|
- ((lu>>10)&0x1f001f);
+ ((lu << 10) & 0x7c007c00)|
+ ((lu) & 0x3e003e0)|
+ ((lu >> 10) & 0x1f001f);
}
SRCPtr += LineOffset;
DSTPtr += SurfOffset;