diff --git a/source/draw.c b/source/draw.c index bd0ec9a..82eec3d 100644 --- a/source/draw.c +++ b/source/draw.c @@ -109,8 +109,8 @@ void throw_error(char* error, int error_type) { hidScanInput(); u32 kDown = hidKeysDown(); draw_base_interface(); - pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_RED, error); - pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to shut down."); + pp2d_draw_text_center(GFX_TOP, 120, 0.6, 0.6, COLOR_RED, error); + pp2d_draw_wtext_center(GFX_TOP, 150, 0.6, 0.6, COLOR_WHITE, L"Press \uE000 to shut down."); pp2d_end_draw(); if (kDown & KEY_A) { if (homebrew) @@ -126,8 +126,8 @@ void throw_error(char* error, int error_type) { hidScanInput(); u32 kDown = hidKeysDown(); draw_base_interface(); - pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_YELLOW, error); - pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to continue."); + pp2d_draw_text_center(GFX_TOP, 120, 0.6, 0.6, COLOR_YELLOW, error); + pp2d_draw_wtext_center(GFX_TOP, 150, 0.6, 0.6, COLOR_WHITE, L"Press \uE000 to continue."); pp2d_end_draw(); if (kDown & KEY_A) break; } diff --git a/source/splashes.c b/source/splashes.c index a7f9d98..f3c5cb8 100644 --- a/source/splashes.c +++ b/source/splashes.c @@ -28,6 +28,7 @@ #include "fs.h" #include "themes.h" #include "pp2d/pp2d/pp2d.h" +#include "draw.h" void load_splash_preview(Splash_s *splash) { @@ -236,6 +237,7 @@ void splash_install(Splash_s splash_to_install) size = file_to_buf(fsMakePath(PATH_UTF16, path), ArchiveSD, &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; @@ -247,10 +249,22 @@ void splash_install(Splash_s splash_to_install) size = file_to_buf(fsMakePath(PATH_UTF16, path), ArchiveSD, &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; size = 0; } } + + char *config_buf; + size = file_to_buf(fsMakePath(PATH_ASCII, "/luma/config.bin"), ArchiveSD, &config_buf); + if (size) + { + if (config_buf[0xC] == 0) + { + free(config_buf); + throw_error("WARNING: Splashes are disabled in Luma Config", WARNING); + } + } } \ No newline at end of file