From 4748c0292ccebfdb7f3aec04cd4d335bdce1a386 Mon Sep 17 00:00:00 2001 From: Aurora Date: Thu, 10 Mar 2016 01:22:20 +0100 Subject: [PATCH] Added bottom screen splash image support As suggested by Apache Thunder --- loader/source/fatfs/sdmmc/sdmmc.c | 2 +- source/draw.c | 6 ++++-- source/fatfs/sdmmc/sdmmc.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/loader/source/fatfs/sdmmc/sdmmc.c b/loader/source/fatfs/sdmmc/sdmmc.c index 6d12848..2ca9952 100644 --- a/loader/source/fatfs/sdmmc/sdmmc.c +++ b/loader/source/fatfs/sdmmc/sdmmc.c @@ -337,7 +337,7 @@ static int SD_Init() { inittarget(&handleSD); - waitcycles(1u << 18); //Card needs a little bit of time to be detected, it seems + waitcycles(1u << 19); //Card needs a little bit of time to be detected, it seems //If not inserted if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1; diff --git a/source/draw.c b/source/draw.c index f6fe0ce..76c46f4 100644 --- a/source/draw.c +++ b/source/draw.c @@ -36,6 +36,8 @@ void clearScreen(void){ void loadSplash(void){ clearScreen(); - if(!fileRead(fb->top_left, "/rei/splash.bin", 0x46500)) return; - u64 i = 0xFFFFFF; while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func + if(fileRead(fb->top_left, "/rei/splash.bin", 0x46500) || + fileRead(fb->bottom, "/rei/splashbottom.bin", 0x38400)){ + u64 i = 0xFFFFFF; while(--i) __asm("mov r0, r0"); //Less Ghetto sleep func + } } \ No newline at end of file diff --git a/source/fatfs/sdmmc/sdmmc.c b/source/fatfs/sdmmc/sdmmc.c index 6d12848..2ca9952 100644 --- a/source/fatfs/sdmmc/sdmmc.c +++ b/source/fatfs/sdmmc/sdmmc.c @@ -337,7 +337,7 @@ static int SD_Init() { inittarget(&handleSD); - waitcycles(1u << 18); //Card needs a little bit of time to be detected, it seems + waitcycles(1u << 19); //Card needs a little bit of time to be detected, it seems //If not inserted if (!(*((vu16*)0x1000601c) & TMIO_STAT0_SIGSTATE)) return -1;