summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-01-25 15:59:43 +0000
committerJens Arnold <amiconn@rockbox.org>2009-01-25 15:59:43 +0000
commit21a0504d16bc15966bcd394239d5f757d284060b (patch)
treec3532b4b3139b6e1d8cefabd60cbd93cb18791d4
parent03e90f841c4ae8943e7153f6c39283f05d9c5b28 (diff)
downloadrockbox-21a0504d16bc15966bcd394239d5f757d284060b.tar.gz
rockbox-21a0504d16bc15966bcd394239d5f757d284060b.tar.bz2
rockbox-21a0504d16bc15966bcd394239d5f757d284060b.zip
Hopefully fix wrong colours on coldfire targets for certain scaling factors. EMAC needs to be in unsigned integer mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19853 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/resize.h2
-rw-r--r--firmware/target/coldfire/system-target.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h
index b37af43f2e..4e71fb8732 100644
--- a/apps/recorder/resize.h
+++ b/apps/recorder/resize.h
@@ -47,7 +47,7 @@
#define SC_NUM 0x80000000U
#define SC_MUL_INIT \
unsigned long macsr_st = coldfire_get_macsr(); \
- coldfire_set_macsr(0);
+ coldfire_set_macsr(EMAC_UNSIGNED);
#define SC_MUL_END coldfire_set_macsr(macsr_st);
#define SC_MUL(x, y) \
({ \
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h
index 84ec6ed4b0..9c349b1436 100644
--- a/firmware/target/coldfire/system-target.h
+++ b/firmware/target/coldfire/system-target.h
@@ -54,6 +54,7 @@
#define EMAC_ROUND 0x10
#define EMAC_FRACTIONAL 0x20
+#define EMAC_UNSIGNED 0x40
#define EMAC_SATURATE 0x80
static inline void coldfire_set_macsr(unsigned long flags)