mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
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
This commit is contained in:
parent
6df48c5f7f
commit
9d92d161d8
1 changed files with 12 additions and 0 deletions
12
apps/main.c
12
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue