aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo
diff options
context:
space:
mode:
authornotaz2010-12-05 22:51:00 +0200
committernotaz2010-12-05 22:51:00 +0200
commit507aaf98de47ca11c52ced9957d4f190aff71777 (patch)
tree36885743250429ff90806f6fbc8c992a42d97aad /plugins/dfxvideo
parent67ba0fb4fa3f120c4156ca7d6155c51b7623e84f (diff)
downloadpcsx_rearmed-507aaf98de47ca11c52ced9957d4f190aff71777.tar.gz
pcsx_rearmed-507aaf98de47ca11c52ced9957d4f190aff71777.tar.bz2
pcsx_rearmed-507aaf98de47ca11c52ced9957d4f190aff71777.zip
fix some alignment issues
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r--plugins/dfxvideo/swap.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/dfxvideo/swap.h b/plugins/dfxvideo/swap.h
index 3f7ac21..e559759 100644
--- a/plugins/dfxvideo/swap.h
+++ b/plugins/dfxvideo/swap.h
@@ -64,8 +64,13 @@ static __inline__ void PUTLE32(uint32_t *ptr, uint32_t val) {
#else
#define GETLE16(X) LE2HOST16(*(uint16_t *)X)
-#define GETLE32(X) LE2HOST32(*(uint32_t *)X)
#define GETLE16D(X) ({uint32_t val = GETLE32(X); (val<<16 | val >> 16);})
#define PUTLE16(X, Y) do{*((uint16_t *)X)=HOST2LE16((uint16_t)Y);}while(0)
+#ifdef __arm__
+#define GETLE32(X) (*(uint16_t *)X|(((uint16_t *)X)[1]<<16))
+#define PUTLE32(X, Y) do{*((uint16_t *)X)=(uint32_t)Y;((uint16_t *)X)[1]=(uint32_t)(Y)>>16;}while(0)
+#else
+#define GETLE32(X) LE2HOST32(*(uint32_t *)X)
#define PUTLE32(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0)
#endif
+#endif