From fbe9e4ac10001f931b2f3b9898e3292d36e8cc7c Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 19 Mar 2022 13:54:25 +0000 Subject: x1000: bootloader: refactor splash/splash2 Allow the use of printf formatting and multiple lines of text using newlines in the string. Change-Id: I65919bf29c16c34c38cf3995e02d2ddbbaa4bdf3 --- bootloader/x1000/install.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bootloader/x1000/install.c') diff --git a/bootloader/x1000/install.c b/bootloader/x1000/install.c index e4af66443b..18b853df7c 100644 --- a/bootloader/x1000/install.c +++ b/bootloader/x1000/install.c @@ -34,7 +34,7 @@ enum { static void bootloader_action(int which) { if(check_disk(true) != DISK_PRESENT) { - splash2(5*HZ, "Install aborted", "Cannot access SD card"); + splashf(5*HZ, "Install aborted\nCannot access SD card"); return; } @@ -46,7 +46,7 @@ static void bootloader_action(int which) default: return; /* can't happen */ } - splash(0, msg); + splashf(0, msg); int rc; switch(which) { @@ -60,7 +60,7 @@ static void bootloader_action(int which) snprintf(buf, sizeof(buf), "%s (%d)", installer_strerror(rc), rc); const char* msg1 = rc == 0 ? "Success" : buf; const char* msg2 = "Press " BL_QUIT_NAME " to continue"; - splash2(0, msg1, msg2); + splashf(0, "%s\n%s", msg1, msg2); while(get_button(TIMEOUT_BLOCK) != BL_QUIT); } -- cgit v1.2.3