add warning when not finding files when installing a splash, and dont delete previous one if none are found

This commit is contained in:
LiquidFenrir
2017-12-31 16:57:51 +01:00
parent b2e81528af
commit fd7e932df3

View File

@@ -39,13 +39,25 @@ void splash_install(Entry_s splash)
char *screen_buf = NULL; char *screen_buf = NULL;
u32 size = load_data("/splash.bin", splash, &screen_buf); u32 size = load_data("/splash.bin", splash, &screen_buf);
if(size != 0)
{
remake_file("/luma/splash.bin", ArchiveSD, size); remake_file("/luma/splash.bin", ArchiveSD, size);
buf_to_file(size, "/luma/splash.bin", ArchiveSD, screen_buf); buf_to_file(size, "/luma/splash.bin", ArchiveSD, screen_buf);
}
size = load_data("/splashbottom.bin", splash, &screen_buf); u32 bottom_size = load_data("/splashbottom.bin", splash, &screen_buf);
remake_file("/luma/splashbottom.bin", ArchiveSD, size); if(bottom_size != 0)
buf_to_file(size, "/luma/splashbottom.bin", ArchiveSD, screen_buf); {
remake_file("/luma/splashbottom.bin", ArchiveSD, bottom_size);
buf_to_file(bottom_size, "/luma/splashbottom.bin", ArchiveSD, screen_buf);
}
if(size == 0 && bottom_size == 0)
{
throw_error("No splash.bin or splashbottom.bin found.\nIs this a splash?", ERROR_LEVEL_WARNING);
}
else
{
char *config_buf; char *config_buf;
size = file_to_buf(fsMakePath(PATH_ASCII, "/luma/config.bin"), ArchiveSD, &config_buf); size = file_to_buf(fsMakePath(PATH_ASCII, "/luma/config.bin"), ArchiveSD, &config_buf);
if(size) if(size)
@@ -57,6 +69,7 @@ void splash_install(Entry_s splash)
} }
} }
} }
}
void splash_check_installed(void * void_arg) void splash_check_installed(void * void_arg)
{ {