]> cvs.zerfleddert.de Git - micropolis/commitdiff
enable swapping for 8 bit on big endian machines
authorMichael Gernoth <michael@gernoth.net>
Mon, 14 Jan 2008 22:40:07 +0000 (23:40 +0100)
committerMichael Gernoth <michael@gernoth.net>
Mon, 14 Jan 2008 22:40:07 +0000 (23:40 +0100)
src/sim/g_smmaps.c
src/sim/w_x.c

index 4ca499a2c97bcc1e16fa37a7c5c8fe99cf256c55..84b7a474045623e91eea170d83518dd276a81883 100644 (file)
@@ -142,9 +142,9 @@ int DynamicData[32];
 #define BE_ROW3_32 BE_ROW1_32(0) BE_ROW1_32(1) BE_ROW1_32(2)
 
 #define ROW3_8 if (view->x->needs_swap) { BE_ROW3_8 } else { LE_ROW3_8 }
-#define ROW3_16 if (view->x->needs_swap) { BE_ROW3_16 } else { LE_ROW3_16 }
-#define ROW3_24 if (view->x->needs_swap) { BE_ROW3_24 } else { LE_ROW3_24 }
-#define ROW3_32 if (view->x->needs_swap) { BE_ROW3_32 } else { LE_ROW3_32 }
+#define ROW3_16 LE_ROW3_16
+#define ROW3_24 LE_ROW3_24
+#define ROW3_32 LE_ROW3_32
 
 #define ROW3 \
          switch (view->x->depth) { \
index 0d682094675b13e28de1152fccb63366e3eb0487..06d3b9eaf49b207009339e192885435c33eaa23f 100644 (file)
@@ -585,8 +585,7 @@ InitNewView(SimView *view, char *title, int class, int w, int h)
     view->type = X_Mem_View;
   }
 
-  /* XXX: Find cases where transaltion is needed */
-  view->x->needs_swap = 0;
+  view->x->needs_swap = !(*(unsigned char*) (&test));
 
 
   GetPixmaps(view->x);
Impressum, Datenschutz