From d99f1c97a0d85aa5f24ab15a562672e936e653b5 Mon Sep 17 00:00:00 2001 From: Helloman892 <1565516+Helloman892@users.noreply.github.com> Date: Sat, 9 Sep 2017 13:07:31 +0100 Subject: [PATCH] fixes splash install If splash.bin and/or splashbottom.bin didn't already exist, splashes would not install. Also added a line break to separate splash_delete(), for consistency. --- source/splashes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/splashes.c b/source/splashes.c index f72a545..a7f9d98 100644 --- a/source/splashes.c +++ b/source/splashes.c @@ -197,11 +197,13 @@ Result get_splashes(Splash_s** splashes_list, int *splash_count) return res; } + void splash_delete() { remove("/luma/splash.bin"); remove("/luma/splashbottom.bin"); } + void splash_install(Splash_s splash_to_install) { char *screen_buf = NULL; @@ -211,6 +213,7 @@ void splash_install(Splash_s splash_to_install) size = zip_file_to_buf("splash.bin", splash_to_install.path, &screen_buf); if (size) { + remake_file("/luma/splash.bin", ArchiveSD, sizeof(screen_buf)); buf_to_file(size, "/luma/splash.bin", ArchiveSD, screen_buf); free(screen_buf); screen_buf = NULL; @@ -220,6 +223,7 @@ void splash_install(Splash_s splash_to_install) size = zip_file_to_buf("splashbottom.bin", splash_to_install.path, &screen_buf); if (size) { + remake_file("/luma/splashbottom.bin", ArchiveSD, sizeof(screen_buf)); buf_to_file(size, "/luma/splashbottom.bin", ArchiveSD, screen_buf); free(screen_buf); screen_buf = NULL;