Add warning about splashes being disabled
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user