OSDN Git Service

MacGui: Fix funky preview image colors in the Picture Preview window on PPC, introdu...
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 17 Jan 2008 14:34:24 +0000 (14:34 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 17 Jan 2008 14:34:24 +0000 (14:34 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@1206 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/PictureController.mm

index fc356c7..60f1637 100644 (file)
@@ -565,7 +565,11 @@ are maintained across different sources */
         for (int r = 0; r < dstHeight; r++)
         {
             for (int c = 0; c < dstWidth; c++)
+#if TARGET_RT_LITTLE_ENDIAN
                 *dst++ = Endian32_Swap(*src++);
+#else
+                *dst++ = *src++;
+#endif
             src += (srcWidth - dstWidth);   // skip to next row in src
         }
 
@@ -613,7 +617,11 @@ are maintained across different sources */
         UInt32 * src = (UInt32 *)buffer;
         UInt32 * dst = (UInt32 *)[imgrep bitmapData];
         for (int i = 0; i < numPixels; i++)
+#if TARGET_RT_LITTLE_ENDIAN
             *dst++ = Endian32_Swap(*src++);
+#else
+            *dst++ = *src++;
+#endif
 
         NSImage * img = [[[NSImage alloc] initWithSize: NSMakeSize(width, height)] autorelease];
         [img addRepresentation:imgrep];