summaryrefslogtreecommitdiffstats
path: root/firmware/common
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2019-07-19 23:20:56 -0400
committerFranklin Wei <git@fwei.tk>2019-07-19 23:20:56 -0400
commitb0e9bb1b91567500475aa3fa6c4085423e774983 (patch)
tree5467290127de70a8c50d192c30b945bf3f6752e6 /firmware/common
parent5d05b9d3e920a6aa5fcb553758e98ed0da8c91e4 (diff)
downloadrockbox-b0e9bb1b91567500475aa3fa6c4085423e774983.tar.gz
rockbox-b0e9bb1b91567500475aa3fa6c4085423e774983.tar.bz2
rockbox-b0e9bb1b91567500475aa3fa6c4085423e774983.zip
Limit float formatting to only targets building Quake
The Quake plugin is the only code that actually relies on float formatting. Because Quake only runs on targets with huge memory anyway, limiting their formatting to just those targets will minimize the increased memory use in the core. Change-Id: Icdbe26ec6ede564861cc01ac4add76a12b00ecd5
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/vuprintf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c
index 8bb9451662..fb053ae7da 100644
--- a/firmware/common/vuprintf.c
+++ b/firmware/common/vuprintf.c
@@ -29,11 +29,18 @@
#include "ap_int.h"
#ifndef BOOTLOADER
+
+/* Only the Quake plugin needs float formatting */
+#if defined(HAVE_LCD_COLOR) && \
+ (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) && \
+ (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & PLATFORM_NATIVE) && defined(CPU_ARM)
/* turn everything on */
#define FMT_LENMOD (0xffffffff)
#define FMT_RADIX (0xffffffff)
#endif
+#endif
+
/* these are the defaults if no other preference is given */
#ifndef FMT_LENMOD
#define FMT_LENMOD (FMT_LENMOD_l | \