mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-09 21:51:45 +00:00
fusee: hide non-error logs behind splash screen (closes #328)
This commit is contained in:
parent
3f6325c358
commit
901723621c
4 changed files with 12 additions and 8 deletions
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "log.h"
|
||||
#include "../console.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -100,7 +101,10 @@ void print(ScreenLogLevel screen_log_level, const char * fmt, ...)
|
|||
char buf[PRINT_MESSAGE_MAX_LENGTH] = {};
|
||||
char message[PRINT_MESSAGE_MAX_LENGTH] = {};
|
||||
|
||||
/* TODO: make splash disappear if level > MANDATORY */
|
||||
/* Make splash disappear if level is ERROR or WARNING */
|
||||
if (screen_log_level < SCREEN_LOG_LEVEL_MANDATORY) {
|
||||
console_resume();
|
||||
}
|
||||
|
||||
/* make prefix free messages with log_level possible */
|
||||
if(screen_log_level & SCREEN_LOG_LEVEL_NO_PREFIX) {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "fs_utils.h"
|
||||
#include "nxfs.h"
|
||||
#include "gpt.h"
|
||||
#include "splash_screen.h"
|
||||
#include "display/video_fb.h"
|
||||
#include "sdmmc/sdmmc.h"
|
||||
#include "lib/log.h"
|
||||
|
@ -95,7 +96,7 @@ int main(int argc, void **argv) {
|
|||
/* Initialize the display, console, FS, etc. */
|
||||
setup_env();
|
||||
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, u8"Welcome to Atmosphère Fusée Stage 2!\n");
|
||||
print(SCREEN_LOG_LEVEL_DEBUG | SCREEN_LOG_LEVEL_NO_PREFIX, u8"Welcome to Atmosphère Fusée Stage 2!\n");
|
||||
print(SCREEN_LOG_LEVEL_DEBUG, "Stage 2 executing from: %s\n", (const char *)argv[STAGE2_ARGV_PROGRAM_PATH]);
|
||||
|
||||
/* This will load all remaining binaries off of the SD. */
|
||||
|
@ -105,6 +106,9 @@ int main(int argc, void **argv) {
|
|||
|
||||
g_do_nxboot = loader_ctx->chainload_entrypoint == 0;
|
||||
if (g_do_nxboot) {
|
||||
/* Display splash screen. */
|
||||
display_splash_screen_bmp(loader_ctx->custom_splash_path, (void *)0xC0000000);
|
||||
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "Now performing nxboot.\n");
|
||||
uint32_t boot_memaddr = nxboot_main();
|
||||
nxboot_finish(boot_memaddr);
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "tsec.h"
|
||||
#include "lp0.h"
|
||||
#include "loader.h"
|
||||
#include "splash_screen.h"
|
||||
#include "exocfg.h"
|
||||
#include "display/video_fb.h"
|
||||
#include "lib/ini.h"
|
||||
|
@ -567,9 +566,6 @@ uint32_t nxboot_main(void) {
|
|||
|
||||
print(SCREEN_LOG_LEVEL_INFO, "[NXBOOT]: Powering on the CCPLEX...\n");
|
||||
|
||||
/* Display splash screen. */
|
||||
display_splash_screen_bmp(loader_ctx->custom_splash_path, (void *)0xC0000000);
|
||||
|
||||
/* Unmount everything. */
|
||||
nxfs_unmount_all();
|
||||
|
||||
|
|
|
@ -85,6 +85,6 @@ void display_splash_screen_bmp(const char *custom_splash_path, void *fb_address)
|
|||
fatal_error("Invalid splash screen format!\n");
|
||||
}
|
||||
|
||||
/* Display the splash screen for three seconds. */
|
||||
udelay(3000000);
|
||||
/* Display the splash screen for two and a half seconds. */
|
||||
udelay(2500000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue