summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-06-11 19:31:12 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-06-16 19:49:55 +0000
commita3f2b64a467c10307ba32ac5e7cd06f5fc27b47f (patch)
tree5e04591a09dcfeabeba00f32a8ddefced1b79459
parentf6c7407cc3304f569ff58d4719e431a9f65e3840 (diff)
downloadrockbox-a3f2b64a467c10307ba32ac5e7cd06f5fc27b47f.tar.gz
rockbox-a3f2b64a467c10307ba32ac5e7cd06f5fc27b47f.zip
Enable float formatting in printf
Needed for g#3415, and if the comment is to be believed, this needed updating for recent MIPS targets anyway. Just blanket enable everything for all targets with >= 8 MiB of RAM. The only targets with less than this are the Sansa Clip, c200v2, and m200v4, which all have 2 MB of RAM. The added code size is around 4 KiB to 7 KiB, depending on the target. Change-Id: I5773482a13543dabb1f93f713a21f1382a9c5a22
-rw-r--r--firmware/common/vuprintf.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c
index fb053ae7da..6a3b29388b 100644
--- a/firmware/common/vuprintf.c
+++ b/firmware/common/vuprintf.c
@@ -30,13 +30,10 @@
30 30
31#ifndef BOOTLOADER 31#ifndef BOOTLOADER
32 32
33/* Only the Quake plugin needs float formatting */ 33/* Turn everything on if we have enough RAM. */
34#if defined(HAVE_LCD_COLOR) && \ 34#if MEMORYSIZE >= 8
35 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE)) && \ 35# define FMT_LENMOD (0xffffffff)
36 (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & PLATFORM_NATIVE) && defined(CPU_ARM) 36# define FMT_RADIX (0xffffffff)
37/* turn everything on */
38#define FMT_LENMOD (0xffffffff)
39#define FMT_RADIX (0xffffffff)
40#endif 37#endif
41 38
42#endif 39#endif