2018-05-05 23:55:40 +02:00
|
|
|
#include <stdio.h>
|
2018-04-11 00:09:00 +02:00
|
|
|
#include "utils.h"
|
2018-04-11 00:37:58 +02:00
|
|
|
#include "timers.h"
|
2018-04-11 00:09:00 +02:00
|
|
|
#include "splash_screen.h"
|
2018-05-13 23:49:50 +02:00
|
|
|
#include "fs_utils.h"
|
2018-04-11 00:09:00 +02:00
|
|
|
#include "display/video_fb.h"
|
|
|
|
|
|
|
|
void display_splash_screen_bmp(const char *custom_splash_path) {
|
2018-05-05 17:33:49 +02:00
|
|
|
uint8_t *splash_screen = g_default_splash_screen;
|
2018-04-11 00:09:00 +02:00
|
|
|
if (custom_splash_path != NULL && custom_splash_path[0] != '\x00') {
|
2018-05-13 23:49:50 +02:00
|
|
|
if (!read_from_file(splash_screen, sizeof(g_default_splash_screen), custom_splash_path)) {
|
2018-05-20 16:18:48 +02:00
|
|
|
fatal_error("Failed to read custom splash screen from %s!\n", custom_splash_path);
|
2018-04-11 00:09:00 +02:00
|
|
|
}
|
|
|
|
}
|
2018-05-05 17:33:49 +02:00
|
|
|
|
2018-04-11 00:09:00 +02:00
|
|
|
/* TODO: Display the splash screen. It should be a pointer to a BMP, at this point. */
|
2018-05-05 17:33:49 +02:00
|
|
|
|
2018-04-11 00:37:58 +02:00
|
|
|
/* Display the splash screen for three seconds. */
|
|
|
|
wait(3000000);
|
2018-05-05 17:33:49 +02:00
|
|
|
}
|