2018-09-07 16:00:13 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Atmosphère-NX
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-05-05 22:55:40 +01:00
|
|
|
#include <stdio.h>
|
2018-04-10 23:37:58 +01:00
|
|
|
#include "timers.h"
|
2018-04-10 23:09:00 +01:00
|
|
|
#include "splash_screen.h"
|
2018-05-13 22:49:50 +01:00
|
|
|
#include "fs_utils.h"
|
2018-04-10 23:09:00 +01:00
|
|
|
#include "display/video_fb.h"
|
|
|
|
|
|
|
|
void display_splash_screen_bmp(const char *custom_splash_path) {
|
2018-05-05 16:33:49 +01:00
|
|
|
uint8_t *splash_screen = g_default_splash_screen;
|
2018-08-31 23:46:08 +01:00
|
|
|
if ((custom_splash_path != NULL) && (custom_splash_path[0] != '\x00')) {
|
2018-05-13 22:49:50 +01:00
|
|
|
if (!read_from_file(splash_screen, sizeof(g_default_splash_screen), custom_splash_path)) {
|
2018-05-20 15:18:48 +01:00
|
|
|
fatal_error("Failed to read custom splash screen from %s!\n", custom_splash_path);
|
2018-04-10 23:09:00 +01:00
|
|
|
}
|
|
|
|
}
|
2018-05-05 16:33:49 +01:00
|
|
|
|
2018-04-10 23:09:00 +01:00
|
|
|
/* TODO: Display the splash screen. It should be a pointer to a BMP, at this point. */
|
2018-05-05 16:33:49 +01:00
|
|
|
|
2018-04-10 23:37:58 +01:00
|
|
|
/* Display the splash screen for three seconds. */
|
2018-09-15 21:08:58 +01:00
|
|
|
udelay(3000000);
|
2018-05-05 16:33:49 +01:00
|
|
|
}
|