From 8b0a1ecfcee730ff9fec186781c0e72357263978 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 3 Sep 2024 20:34:25 +1000 Subject: [PATCH] NDS: See if this fixes SD card loading --- src/Platform_NDS.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Platform_NDS.c b/src/Platform_NDS.c index 9bdc6e9da..207d95414 100644 --- a/src/Platform_NDS.c +++ b/src/Platform_NDS.c @@ -233,6 +233,9 @@ static int LoadFatFilesystem(void* arg) { } static void MountFilesystem(void) { + LoadFatFilesystem(NULL); + return; + cothread_t thread = cothread_create(LoadFatFilesystem, NULL, 0, 0); // If running with DSi mode in melonDS and the internal SD card is enabled, then // fatInitDefault gets stuck in sdmmc_ReadSectors - because the fifoWaitValue32Async will never return @@ -244,14 +247,14 @@ static void MountFilesystem(void) { return; } - for (int i = 0; i < 500; i++) + for (int i = 0; i < 1000; i++) { cothread_yield(); if (cothread_has_joined(thread)) return; swiDelay(500); } - Platform_LogConst("Gave up after 500 tries"); + Platform_LogConst("Gave up after 1000 tries"); } static void InitFilesystem(void) {