From 9d92d161d8535a41eff7cbb42f2cc3e131a38393 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 20 Jul 2025 12:16:15 -0400 Subject: [PATCH] Splash modified playername.txt on device startup if playername.txt is modified its now splashed on device start-up should be less confusing than having it in the WPS theme I hope.. Change-Id: Ifcec491f75a0c977a98d26292509f4ca62d79dac --- apps/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/main.c b/apps/main.c index 7a29e90ab0..8643acc9f2 100644 --- a/apps/main.c +++ b/apps/main.c @@ -201,6 +201,7 @@ int main(void) #if !defined(BOOTLOADER) allocate_playback_log(); + static char playername[64]; if (!file_exists(ROCKBOX_DIR"/playername.txt")) { int fd = open(ROCKBOX_DIR"/playername.txt", O_CREAT|O_WRONLY|O_TRUNC, 0666); @@ -210,6 +211,17 @@ int main(void) close(fd); } } + else + { + int fd = open(ROCKBOX_DIR"/playername.txt", O_RDONLY); + if(fd >= 0) + { + read_line(fd, playername, sizeof(playername)); + close(fd); + if (strcmp(playername, MODEL_NAME) != 0) + splashf(HZ * 2, "%s", playername); + } + } #endif #ifdef AUTOROCK