diff options
author | Franklin Wei <git@fwei.tk> | 2019-07-19 23:20:56 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2019-07-19 23:20:56 -0400 |
commit | b0e9bb1b91567500475aa3fa6c4085423e774983 (patch) | |
tree | 5467290127de70a8c50d192c30b945bf3f6752e6 | |
parent | 5d05b9d3e920a6aa5fcb553758e98ed0da8c91e4 (diff) | |
download | rockbox-b0e9bb1b91567500475aa3fa6c4085423e774983.tar.gz 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
-rw-r--r-- | firmware/common/vuprintf.c | 7 |
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 @@ | |||
29 | #include "ap_int.h" | 29 | #include "ap_int.h" |
30 | 30 | ||
31 | #ifndef BOOTLOADER | 31 | #ifndef BOOTLOADER |
32 | |||
33 | /* Only the Quake plugin needs float formatting */ | ||
34 | #if defined(HAVE_LCD_COLOR) && \ | ||
35 | (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) && \ | ||
36 | (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & PLATFORM_NATIVE) && defined(CPU_ARM) | ||
32 | /* turn everything on */ | 37 | /* turn everything on */ |
33 | #define FMT_LENMOD (0xffffffff) | 38 | #define FMT_LENMOD (0xffffffff) |
34 | #define FMT_RADIX (0xffffffff) | 39 | #define FMT_RADIX (0xffffffff) |
35 | #endif | 40 | #endif |
36 | 41 | ||
42 | #endif | ||
43 | |||
37 | /* these are the defaults if no other preference is given */ | 44 | /* these are the defaults if no other preference is given */ |
38 | #ifndef FMT_LENMOD | 45 | #ifndef FMT_LENMOD |
39 | #define FMT_LENMOD (FMT_LENMOD_l | \ | 46 | #define FMT_LENMOD (FMT_LENMOD_l | \ |