Fix splash install when /luma/splash.bin or /luma/splashbottom.bin were missing
This commit is contained in:
@@ -140,7 +140,7 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t
|
||||
pp2d_draw_wtext(20, 65, 0.5, 0.5, COLOR_WHITE, description);
|
||||
|
||||
pp2d_draw_wtext_center(GFX_TOP, 150, 0.7, 0.7, COLOR_WHITE, L"\uE000 Install Theme \uE004 Switch to Splashes");
|
||||
pp2d_draw_wtext_center(GFX_TOP, 180, 0.7, 0.7, COLOR_WHITE, L"\uE001 Queue Shuffle \uE046 Install shuffle");
|
||||
pp2d_draw_wtext_center(GFX_TOP, 180, 0.7, 0.7, COLOR_WHITE, L"\uE001 Queue Shuffle \uE046 Install Shuffle");
|
||||
pp2d_draw_wtext_center(GFX_TOP, 210, 0.7, 0.7, COLOR_WHITE, L"\uE003 Preview Theme");
|
||||
|
||||
pp2d_draw_on(GFX_BOTTOM);
|
||||
@@ -197,6 +197,13 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t
|
||||
pp2d_end_draw();
|
||||
}
|
||||
|
||||
void draw_splash_install(void)
|
||||
{
|
||||
draw_base_interface();
|
||||
pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a splash...");
|
||||
pp2d_end_draw();
|
||||
}
|
||||
|
||||
void draw_splash_interface(Splash_s *splashes_list, int splash_count, int selected_splash, bool preview_mode)
|
||||
{
|
||||
if (splashes_list == NULL)
|
||||
|
||||
@@ -131,7 +131,9 @@ int main(void)
|
||||
{
|
||||
if (splash_mode)
|
||||
{
|
||||
draw_splash_install();
|
||||
splash_install(*current_splash);
|
||||
svcSleepThread(5e8);
|
||||
} else {
|
||||
draw_theme_install(false);
|
||||
single_install(*current_theme);
|
||||
|
||||
@@ -93,6 +93,7 @@ void splash_install(Splash_s splash_to_install)
|
||||
u32 size = file_to_buf(fsMakePath(PATH_UTF16, splash_to_install.top_path), ArchiveSD, &screen_buf);
|
||||
if (size)
|
||||
{
|
||||
remake_file("/luma/splash.bin", ArchiveSD, size);
|
||||
buf_to_file(size, "/luma/splash.bin", ArchiveSD, screen_buf);
|
||||
free(screen_buf);
|
||||
}
|
||||
@@ -100,6 +101,7 @@ void splash_install(Splash_s splash_to_install)
|
||||
size = file_to_buf(fsMakePath(PATH_UTF16, splash_to_install.bottom_path), ArchiveSD, &screen_buf);
|
||||
if (size)
|
||||
{
|
||||
remake_file("/luma/splashbottom.bin", ArchiveSD, size);
|
||||
buf_to_file(size, "/luma/splashbottom.bin", ArchiveSD, screen_buf);
|
||||
free(screen_buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user